Fix patching of wrong boto3_conn in API Gateway tests (#42700)
This commit is contained in:
parent
97cc0cce7f
commit
45f5964fed
1 changed files with 3 additions and 2 deletions
|
@ -31,6 +31,7 @@ if not HAS_BOTO3:
|
||||||
pytestmark = pytest.mark.skip("test_api_gateway.py requires the `boto3` and `botocore` modules")
|
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.modules.cloud.amazon.aws_api_gateway as agw
|
||||||
|
import ansible.module_utils.aws.core as core
|
||||||
|
|
||||||
|
|
||||||
exit_return_dict = {}
|
exit_return_dict = {}
|
||||||
|
@ -53,8 +54,8 @@ def test_upload_api(monkeypatch):
|
||||||
def return_fake_connection(*args, **kwargs):
|
def return_fake_connection(*args, **kwargs):
|
||||||
return FakeConnection()
|
return FakeConnection()
|
||||||
|
|
||||||
monkeypatch.setattr(agw, "boto3_conn", return_fake_connection)
|
monkeypatch.setattr(core, "boto3_conn", return_fake_connection)
|
||||||
monkeypatch.setattr(agw.AnsibleModule, "exit_json", fake_exit_json)
|
monkeypatch.setattr(core.AnsibleAWSModule, "exit_json", fake_exit_json)
|
||||||
|
|
||||||
set_module_args({
|
set_module_args({
|
||||||
"api_id": "fred",
|
"api_id": "fred",
|
||||||
|
|
Loading…
Reference in a new issue