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

@ -2,6 +2,7 @@ from __future__ import unicode_literals
import json
from werkzeug.exceptions import BadRequest
from moto.iam.models import ACCOUNT_ID
class ResourceNotFoundError(BadRequest):
@ -23,14 +24,14 @@ class ResourceInUseError(BadRequest):
class StreamNotFoundError(ResourceNotFoundError):
def __init__(self, stream_name):
super(StreamNotFoundError, self).__init__(
"Stream {0} under account 123456789012 not found.".format(stream_name)
"Stream {0} under account {1} not found.".format(stream_name, ACCOUNT_ID)
)
class ShardNotFoundError(ResourceNotFoundError):
def __init__(self, shard_id):
super(ShardNotFoundError, self).__init__(
"Shard {0} under account 123456789012 not found.".format(shard_id)
"Shard {0} under account {1} not found.".format(shard_id, ACCOUNT_ID)
)