From 45f5964fed9d81821d2c90e3e7466a16cbfe48d0 Mon Sep 17 00:00:00 2001 From: Ryan Brown Date: Thu, 12 Jul 2018 13:06:32 -0400 Subject: [PATCH] Fix patching of wrong boto3_conn in API Gateway tests (#42700) --- test/units/modules/cloud/amazon/test_api_gateway.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/units/modules/cloud/amazon/test_api_gateway.py b/test/units/modules/cloud/amazon/test_api_gateway.py index 2be188fc2d3..d6f4c7e719f 100644 --- a/test/units/modules/cloud/amazon/test_api_gateway.py +++ b/test/units/modules/cloud/amazon/test_api_gateway.py @@ -31,6 +31,7 @@ if not HAS_BOTO3: pytestmark = pytest.mark.skip("test_api_gateway.py requires the `boto3` and `botocore` modules") import ansible.modules.cloud.amazon.aws_api_gateway as agw +import ansible.module_utils.aws.core as core exit_return_dict = {} @@ -53,8 +54,8 @@ def test_upload_api(monkeypatch): def return_fake_connection(*args, **kwargs): return FakeConnection() - monkeypatch.setattr(agw, "boto3_conn", return_fake_connection) - monkeypatch.setattr(agw.AnsibleModule, "exit_json", fake_exit_json) + monkeypatch.setattr(core, "boto3_conn", return_fake_connection) + monkeypatch.setattr(core.AnsibleAWSModule, "exit_json", fake_exit_json) set_module_args({ "api_id": "fred",