Fix patching of wrong boto3_conn in API Gateway tests (#42700)

This commit is contained in:
Ryan Brown 2018-07-12 13:06:32 -04:00 committed by Sloane Hertel
parent 97cc0cce7f
commit 45f5964fed

View file

@ -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",