Added references to moto.iam.models.ACCOUNT_ID instead of hardcoded id

This commit is contained in:
Fabio Dias 2019-12-15 19:22:26 -05:00
commit b83a750630
54 changed files with 326 additions and 295 deletions

View file

@ -9,6 +9,7 @@ from botocore.exceptions import ClientError
import responses
from moto import mock_apigateway, settings
from moto.iam.models import ACCOUNT_ID
from nose.tools import assert_raises
@ -881,7 +882,7 @@ def test_put_integration_validation():
client.put_integration(
restApiId=api_id,
resourceId=root_id,
credentials="arn:aws:iam::123456789012:role/service-role/testfunction-role-oe783psq",
credentials="arn:aws:iam::{}:role/service-role/testfunction-role-oe783psq".format(ACCOUNT_ID),
httpMethod="GET",
type=type,
uri="arn:aws:apigateway:us-west-2:s3:path/b/k",
@ -903,7 +904,7 @@ def test_put_integration_validation():
client.put_integration(
restApiId=api_id,
resourceId=root_id,
credentials="arn:aws:iam::123456789012:role/service-role/testfunction-role-oe783psq",
credentials="arn:aws:iam::{}:role/service-role/testfunction-role-oe783psq".format(ACCOUNT_ID),
httpMethod="GET",
type=type,
uri="arn:aws:apigateway:us-west-2:s3:path/b/k",