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

@ -8,6 +8,7 @@ import boto3
from boto.kinesis.exceptions import ResourceNotFoundException, InvalidArgumentException
from moto import mock_kinesis, mock_kinesis_deprecated
from moto.iam.models import ACCOUNT_ID
@mock_kinesis_deprecated
@ -21,7 +22,7 @@ def test_create_cluster():
stream = stream_response["StreamDescription"]
stream["StreamName"].should.equal("my_stream")
stream["HasMoreShards"].should.equal(False)
stream["StreamARN"].should.equal("arn:aws:kinesis:us-west-2:123456789012:my_stream")
stream["StreamARN"].should.equal("arn:aws:kinesis:us-west-2:{}:my_stream".format(ACCOUNT_ID))
stream["StreamStatus"].should.equal("ACTIVE")
shards = stream["Shards"]
@ -87,7 +88,7 @@ def test_describe_stream_summary():
stream["StreamName"].should.equal(stream_name)
stream["OpenShardCount"].should.equal(shard_count)
stream["StreamARN"].should.equal(
"arn:aws:kinesis:us-west-2:123456789012:{}".format(stream_name)
"arn:aws:kinesis:us-west-2:{}:{}".format(ACCOUNT_ID, stream_name)
)
stream["StreamStatus"].should.equal("ACTIVE")