ACCOUNT_ID moved to moto.core, MOTO_ACCOUNT_ID env var override
This commit is contained in:
parent
fb9ebe5a47
commit
fd9ac4b9a5
60 changed files with 67 additions and 67 deletions
|
|
@ -12,7 +12,6 @@ from boto3 import Session
|
|||
|
||||
from moto.compat import OrderedDict
|
||||
from moto.core import BaseBackend, BaseModel
|
||||
from moto.iam.models import ACCOUNT_ID
|
||||
from moto.core.utils import (
|
||||
iso_8601_datetime_with_milliseconds,
|
||||
camelcase_to_underscores,
|
||||
|
|
@ -32,7 +31,7 @@ from .exceptions import (
|
|||
)
|
||||
from .utils import make_arn_for_topic, make_arn_for_subscription, is_e164
|
||||
|
||||
from moto.iam.models import ACCOUNT_ID as DEFAULT_ACCOUNT_ID
|
||||
from moto.core import ACCOUNT_ID as DEFAULT_ACCOUNT_ID
|
||||
DEFAULT_PAGE_SIZE = 100
|
||||
MAXIMUM_MESSAGE_LENGTH = 262144 # 256 KiB
|
||||
|
||||
|
|
@ -260,7 +259,7 @@ class Subscription(BaseModel):
|
|||
"SignatureVersion": "1",
|
||||
"Signature": "EXAMPLElDMXvB8r9R83tGoNn0ecwd5UjllzsvSvbItzfaMpN2nk5HVSw7XnOn/49IkxDKz8YrlH2qJXj2iZB0Zo2O71c4qQk1fMUDi3LGpij7RCW7AW9vYYsSqIKRnFS94ilu7NFhUzLiieYr4BKHpdTmdD6c0esKEYBpabxDSc=",
|
||||
"SigningCertURL": "https://sns.us-east-1.amazonaws.com/SimpleNotificationService-f3ecfb7224c7233fe7bb5f59f96de52f.pem",
|
||||
"UnsubscribeURL": "https://sns.us-east-1.amazonaws.com/?Action=Unsubscribe&SubscriptionArn=arn:aws:sns:us-east-1:{}:some-topic:2bcfbf39-05c3-41de-beaa-fcfcc21c8f55".format(ACCOUNT_ID),
|
||||
"UnsubscribeURL": "https://sns.us-east-1.amazonaws.com/?Action=Unsubscribe&SubscriptionArn=arn:aws:sns:us-east-1:{}:some-topic:2bcfbf39-05c3-41de-beaa-fcfcc21c8f55".format(DEFAULT_ACCOUNT_ID),
|
||||
}
|
||||
if message_attributes:
|
||||
post_data["MessageAttributes"] = message_attributes
|
||||
|
|
@ -277,7 +276,7 @@ class PlatformApplication(BaseModel):
|
|||
@property
|
||||
def arn(self):
|
||||
return "arn:aws:sns:{region}:{AccountId}:app/{platform}/{name}".format(
|
||||
region=self.region, platform=self.platform, name=self.name, AccountId=ACCOUNT_ID
|
||||
region=self.region, platform=self.platform, name=self.name, AccountId=DEFAULT_ACCOUNT_ID
|
||||
)
|
||||
|
||||
|
||||
|
|
@ -308,7 +307,7 @@ class PlatformEndpoint(BaseModel):
|
|||
def arn(self):
|
||||
return "arn:aws:sns:{region}:{AccountId}:endpoint/{platform}/{name}/{id}".format(
|
||||
region=self.region,
|
||||
AccountId=ACCOUNT_ID,
|
||||
AccountId=DEFAULT_ACCOUNT_ID,
|
||||
platform=self.application.platform,
|
||||
name=self.application.name,
|
||||
id=self.id,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue