ACCOUNT_ID moved to moto.core, MOTO_ACCOUNT_ID env var override
This commit is contained in:
parent
fb9ebe5a47
commit
fd9ac4b9a5
@ -13,7 +13,7 @@ import cryptography.hazmat.primitives.asymmetric.rsa
|
||||
from cryptography.hazmat.primitives import serialization, hashes
|
||||
from cryptography.hazmat.backends import default_backend
|
||||
|
||||
from moto.iam.models import ACCOUNT_ID as DEFAULT_ACCOUNT_ID
|
||||
from moto.core import ACCOUNT_ID as DEFAULT_ACCOUNT_ID
|
||||
|
||||
|
||||
GOOGLE_ROOT_CA = b"""-----BEGIN CERTIFICATE-----
|
||||
|
@ -4,7 +4,7 @@ import time
|
||||
import boto3
|
||||
from moto.core import BaseBackend, BaseModel
|
||||
|
||||
from moto.iam.models import ACCOUNT_ID
|
||||
from moto.core import ACCOUNT_ID
|
||||
|
||||
|
||||
class TaggableResourceMixin(object):
|
||||
|
@ -42,7 +42,7 @@ from .utils import make_function_arn, make_function_ver_arn
|
||||
from moto.sqs import sqs_backends
|
||||
from moto.dynamodb2 import dynamodb_backends2
|
||||
from moto.dynamodbstreams import dynamodbstreams_backends
|
||||
from moto.iam.models import ACCOUNT_ID
|
||||
from moto.core import ACCOUNT_ID
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
@ -28,7 +28,7 @@ from .utils import (
|
||||
from moto.ec2.exceptions import InvalidSubnetIdError
|
||||
from moto.ec2.models import INSTANCE_TYPES as EC2_INSTANCE_TYPES
|
||||
from moto.iam.exceptions import IAMNotFoundException
|
||||
from moto.iam.models import ACCOUNT_ID as DEFAULT_ACCOUNT_ID
|
||||
from moto.core import ACCOUNT_ID as DEFAULT_ACCOUNT_ID
|
||||
|
||||
_orig_adapter_send = requests.adapters.HTTPAdapter.send
|
||||
logger = logging.getLogger(__name__)
|
||||
|
@ -27,7 +27,7 @@ from moto.route53 import models as route53_models
|
||||
from moto.s3 import models as s3_models
|
||||
from moto.sns import models as sns_models
|
||||
from moto.sqs import models as sqs_models
|
||||
from moto.iam.models import ACCOUNT_ID
|
||||
from moto.core import ACCOUNT_ID
|
||||
from .utils import random_suffix
|
||||
from .exceptions import (
|
||||
ExportNotFound,
|
||||
|
@ -7,7 +7,7 @@ from six.moves.urllib.parse import urlparse
|
||||
from moto.core.responses import BaseResponse
|
||||
from moto.core.utils import amzn_request_id
|
||||
from moto.s3 import s3_backend
|
||||
from moto.iam.models import ACCOUNT_ID
|
||||
from moto.core import ACCOUNT_ID
|
||||
from .models import cloudformation_backends
|
||||
from .exceptions import ValidationError
|
||||
|
||||
|
@ -7,7 +7,7 @@ import os
|
||||
import string
|
||||
|
||||
from cfnlint import decode, core
|
||||
from moto.iam.models import ACCOUNT_ID
|
||||
from moto.core import ACCOUNT_ID
|
||||
|
||||
def generate_stack_id(stack_name, region="us-east-1", account="123456789"):
|
||||
random_id = uuid.uuid4()
|
||||
|
@ -8,7 +8,7 @@ from dateutil.tz import tzutc
|
||||
from uuid import uuid4
|
||||
from .utils import make_arn_for_dashboard
|
||||
|
||||
from moto.iam.models import ACCOUNT_ID as DEFAULT_ACCOUNT_ID
|
||||
from moto.core import ACCOUNT_ID as DEFAULT_ACCOUNT_ID
|
||||
|
||||
_EMPTY_LIST = tuple()
|
||||
|
||||
|
@ -45,7 +45,7 @@ from moto.config.exceptions import (
|
||||
from moto.core import BaseBackend, BaseModel
|
||||
from moto.s3.config import s3_config_query
|
||||
|
||||
from moto.iam.models import ACCOUNT_ID as DEFAULT_ACCOUNT_ID
|
||||
from moto.core import ACCOUNT_ID as DEFAULT_ACCOUNT_ID
|
||||
POP_STRINGS = [
|
||||
"capitalizeStart",
|
||||
"CapitalizeStart",
|
||||
|
@ -1,6 +1,6 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from .models import BaseModel, BaseBackend, moto_api_backend # noqa
|
||||
from .models import BaseModel, BaseBackend, moto_api_backend, ACCOUNT_ID # noqa
|
||||
from .responses import ActionAuthenticatorMixin
|
||||
|
||||
moto_api_backends = {"global": moto_api_backend}
|
||||
|
@ -24,7 +24,8 @@ from botocore.awsrequest import AWSRequest
|
||||
from botocore.credentials import Credentials
|
||||
from six import string_types
|
||||
|
||||
from moto.iam.models import ACCOUNT_ID, Policy
|
||||
from moto.core import ACCOUNT_ID
|
||||
from moto.iam.models import Policy
|
||||
from moto.iam import iam_backend
|
||||
from moto.core.exceptions import (
|
||||
SignatureDoesNotMatchError,
|
||||
|
@ -23,6 +23,9 @@ from .utils import (
|
||||
)
|
||||
|
||||
|
||||
ACCOUNT_ID = os.environ.get('MOTO_ACCOUNT_ID','123456789012')
|
||||
|
||||
|
||||
class BaseMockAWS(object):
|
||||
nested_count = 0
|
||||
|
||||
|
@ -6,7 +6,7 @@ import json
|
||||
from moto.compat import OrderedDict
|
||||
from moto.core import BaseBackend, BaseModel
|
||||
from moto.core.utils import unix_time
|
||||
from moto.iam.models import ACCOUNT_ID
|
||||
from moto.core import ACCOUNT_ID
|
||||
from .comparisons import get_comparison_func
|
||||
|
||||
|
||||
|
@ -6,7 +6,7 @@ from moto.core.responses import BaseResponse
|
||||
from moto.core.utils import camelcase_to_underscores
|
||||
from moto.ec2.utils import filters_from_querystring, dict_from_querystring
|
||||
from moto.elbv2 import elbv2_backends
|
||||
from moto.iam.models import ACCOUNT_ID
|
||||
from moto.core import ACCOUNT_ID
|
||||
|
||||
class InstanceResponse(BaseResponse):
|
||||
def describe_instances(self):
|
||||
|
@ -2,7 +2,7 @@ from __future__ import unicode_literals
|
||||
|
||||
from moto.core.responses import BaseResponse
|
||||
from moto.ec2.utils import filters_from_querystring
|
||||
from moto.iam.models import ACCOUNT_ID
|
||||
from moto.core import ACCOUNT_ID
|
||||
|
||||
|
||||
def try_parse_int(value, default=None):
|
||||
|
@ -1,6 +1,6 @@
|
||||
from __future__ import unicode_literals
|
||||
from moto.core.responses import BaseResponse
|
||||
from moto.iam.models import ACCOUNT_ID
|
||||
from moto.core import ACCOUNT_ID
|
||||
|
||||
|
||||
class VPCPeeringConnections(BaseResponse):
|
||||
|
@ -14,7 +14,7 @@ from cryptography.hazmat.backends import default_backend
|
||||
from six.moves.urllib.parse import urlparse
|
||||
|
||||
from moto.core.exceptions import RESTError
|
||||
from moto.core import BaseBackend, BaseModel
|
||||
from moto.core import BaseBackend, BaseModel, ACCOUNT_ID
|
||||
from moto.core.utils import (
|
||||
iso_8601_datetime_without_milliseconds,
|
||||
iso_8601_datetime_with_milliseconds,
|
||||
@ -45,8 +45,6 @@ from .utils import (
|
||||
random_policy_id,
|
||||
)
|
||||
|
||||
ACCOUNT_ID = '123456789012'
|
||||
|
||||
|
||||
class MFADevice(object):
|
||||
"""MFA Device class."""
|
||||
|
@ -2,7 +2,7 @@ from __future__ import unicode_literals
|
||||
|
||||
import json
|
||||
from werkzeug.exceptions import BadRequest
|
||||
from moto.iam.models import ACCOUNT_ID
|
||||
from moto.core import ACCOUNT_ID
|
||||
|
||||
|
||||
class ResourceNotFoundError(BadRequest):
|
||||
|
@ -13,7 +13,7 @@ from hashlib import md5
|
||||
from moto.compat import OrderedDict
|
||||
from moto.core import BaseBackend, BaseModel
|
||||
from moto.core.utils import unix_time
|
||||
from moto.iam.models import ACCOUNT_ID
|
||||
from moto.core import ACCOUNT_ID
|
||||
from .exceptions import (
|
||||
StreamNotFoundError,
|
||||
ShardNotFoundError,
|
||||
|
@ -1,7 +1,7 @@
|
||||
from __future__ import unicode_literals
|
||||
from moto.core import BaseBackend, BaseModel
|
||||
from moto.ec2 import ec2_backends
|
||||
from moto.iam.models import ACCOUNT_ID
|
||||
from moto.core import ACCOUNT_ID
|
||||
import uuid
|
||||
import datetime
|
||||
from random import choice
|
||||
|
@ -2,7 +2,7 @@ from __future__ import unicode_literals
|
||||
|
||||
import random
|
||||
import string
|
||||
from moto.iam.models import ACCOUNT_ID
|
||||
from moto.core import ACCOUNT_ID
|
||||
|
||||
|
||||
MASTER_ACCOUNT_ID = ACCOUNT_ID
|
||||
|
@ -8,7 +8,7 @@ from moto.core import BaseBackend, BaseModel
|
||||
from .resources import VOICE_DATA
|
||||
from .utils import make_arn_for_lexicon
|
||||
|
||||
from moto.iam.models import ACCOUNT_ID as DEFAULT_ACCOUNT_ID
|
||||
from moto.core import ACCOUNT_ID as DEFAULT_ACCOUNT_ID
|
||||
|
||||
|
||||
class Lexicon(BaseModel):
|
||||
|
@ -27,7 +27,7 @@ from .exceptions import (
|
||||
)
|
||||
|
||||
|
||||
from moto.iam.models import ACCOUNT_ID
|
||||
from moto.core import ACCOUNT_ID
|
||||
|
||||
|
||||
class TaggableResourceMixin(object):
|
||||
|
@ -6,7 +6,7 @@ import json
|
||||
import re
|
||||
|
||||
from moto.core import BaseBackend, BaseModel
|
||||
from moto.iam.models import ACCOUNT_ID
|
||||
from moto.core import ACCOUNT_ID
|
||||
from .exceptions import BadRequestException
|
||||
|
||||
|
||||
|
@ -13,7 +13,7 @@ import xmltodict
|
||||
from moto.packages.httpretty.core import HTTPrettyRequest
|
||||
from moto.core.responses import _TemplateEnvironmentMixin, ActionAuthenticatorMixin
|
||||
from moto.core.utils import path_url
|
||||
from moto.iam.models import ACCOUNT_ID
|
||||
from moto.core import ACCOUNT_ID
|
||||
|
||||
from moto.s3bucket_path.utils import (
|
||||
bucket_name_from_url as bucketpath_bucket_name_from_url,
|
||||
|
@ -1,4 +1,4 @@
|
||||
from moto.iam.models import ACCOUNT_ID
|
||||
from moto.core import ACCOUNT_ID
|
||||
"""
|
||||
SES Feedback messages
|
||||
Extracted from https://docs.aws.amazon.com/ses/latest/DeveloperGuide/notification-contents.html
|
||||
|
@ -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,
|
||||
|
@ -12,7 +12,6 @@ import boto.sqs
|
||||
|
||||
from moto.core.exceptions import RESTError
|
||||
from moto.core import BaseBackend, BaseModel
|
||||
from moto.iam.models import ACCOUNT_ID
|
||||
from moto.core.utils import (
|
||||
camelcase_to_underscores,
|
||||
get_random_message_id,
|
||||
@ -33,7 +32,7 @@ from .exceptions import (
|
||||
InvalidAttributeName,
|
||||
)
|
||||
|
||||
from moto.iam.models import ACCOUNT_ID as DEFAULT_ACCOUNT_ID
|
||||
from moto.core import ACCOUNT_ID as DEFAULT_ACCOUNT_ID
|
||||
DEFAULT_SENDER_ID = "AIDAIT2UOQQY3AUEKVGXU"
|
||||
|
||||
MAXIMUM_MESSAGE_LENGTH = 262144 # 256 KiB
|
||||
@ -419,7 +418,7 @@ class Queue(BaseModel):
|
||||
|
||||
def url(self, request_url):
|
||||
return "{0}://{1}/{2}/{3}".format(
|
||||
request_url.scheme, request_url.netloc, ACCOUNT_ID, self.name
|
||||
request_url.scheme, request_url.netloc, DEFAULT_ACCOUNT_ID, self.name
|
||||
)
|
||||
|
||||
@property
|
||||
|
@ -2,7 +2,7 @@ from __future__ import unicode_literals
|
||||
import datetime
|
||||
from moto.core import BaseBackend, BaseModel
|
||||
from moto.core.utils import iso_8601_datetime_with_milliseconds
|
||||
from moto.iam.models import ACCOUNT_ID
|
||||
from moto.core import ACCOUNT_ID
|
||||
from moto.sts.utils import (
|
||||
random_access_key_id,
|
||||
random_secret_access_key,
|
||||
|
@ -1,7 +1,7 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from moto.core.responses import BaseResponse
|
||||
from moto.iam.models import ACCOUNT_ID
|
||||
from moto.core import ACCOUNT_ID
|
||||
from moto.iam import iam_backend
|
||||
from .exceptions import STSValidationError
|
||||
from .models import sts_backend
|
||||
|
@ -9,7 +9,7 @@ import uuid
|
||||
from botocore.exceptions import ClientError
|
||||
|
||||
from moto import mock_acm
|
||||
from moto.iam.models import ACCOUNT_ID
|
||||
from moto.core import ACCOUNT_ID
|
||||
|
||||
|
||||
RESOURCE_FOLDER = os.path.join(os.path.dirname(__file__), "resources")
|
||||
|
@ -9,7 +9,7 @@ from botocore.exceptions import ClientError
|
||||
|
||||
import responses
|
||||
from moto import mock_apigateway, settings
|
||||
from moto.iam.models import ACCOUNT_ID
|
||||
from moto.core import ACCOUNT_ID
|
||||
from nose.tools import assert_raises
|
||||
|
||||
|
||||
|
@ -8,7 +8,7 @@ import sure # noqa
|
||||
|
||||
from moto import mock_autoscaling_deprecated
|
||||
from moto import mock_autoscaling
|
||||
from moto.iam.models import ACCOUNT_ID
|
||||
from moto.core import ACCOUNT_ID
|
||||
from tests.helpers import requires_boto_gte
|
||||
|
||||
|
||||
|
@ -14,7 +14,7 @@ import sure # noqa
|
||||
# Ensure 'assert_raises' context manager support for Python 2.6
|
||||
import tests.backport_assert_raises # noqa
|
||||
from nose.tools import assert_raises
|
||||
from moto.iam.models import ACCOUNT_ID
|
||||
from moto.core import ACCOUNT_ID
|
||||
|
||||
from moto import (
|
||||
mock_cloudformation_deprecated,
|
||||
|
@ -11,7 +11,7 @@ import sure # noqa
|
||||
from nose.tools import assert_raises
|
||||
|
||||
from moto import mock_cloudformation, mock_s3, mock_sqs, mock_ec2
|
||||
from moto.iam.models import ACCOUNT_ID
|
||||
from moto.core import ACCOUNT_ID
|
||||
|
||||
dummy_template = {
|
||||
"AWSTemplateFormatVersion": "2010-09-09",
|
||||
|
@ -43,7 +43,7 @@ from moto import (
|
||||
mock_sqs_deprecated,
|
||||
mock_elbv2,
|
||||
)
|
||||
from moto.iam.models import ACCOUNT_ID
|
||||
from moto.core import ACCOUNT_ID
|
||||
from moto.dynamodb2.models import Table
|
||||
|
||||
from .fixtures import (
|
||||
|
@ -6,7 +6,7 @@ from nose.tools import assert_raises
|
||||
|
||||
from moto import mock_cognitoidentity
|
||||
from moto.cognitoidentity.utils import get_random_identity_id
|
||||
from moto.iam.models import ACCOUNT_ID
|
||||
from moto.core import ACCOUNT_ID
|
||||
|
||||
@mock_cognitoidentity
|
||||
def test_create_identity_pool():
|
||||
|
@ -14,7 +14,7 @@ from jose import jws
|
||||
from nose.tools import assert_raises
|
||||
|
||||
from moto import mock_cognitoidp
|
||||
from moto.iam.models import ACCOUNT_ID
|
||||
from moto.core import ACCOUNT_ID
|
||||
|
||||
|
||||
@mock_cognitoidp
|
||||
|
@ -7,7 +7,7 @@ from nose.tools import assert_raises
|
||||
|
||||
from moto import mock_s3
|
||||
from moto.config import mock_config
|
||||
from moto.iam.models import ACCOUNT_ID
|
||||
from moto.core import ACCOUNT_ID
|
||||
|
||||
@mock_config
|
||||
def test_put_configuration_recorder():
|
||||
|
@ -10,7 +10,7 @@ from nose.tools import assert_raises
|
||||
|
||||
from moto import mock_iam, mock_ec2, mock_s3, mock_sts, mock_elbv2, mock_rds2
|
||||
from moto.core import set_initial_no_auth_action_count
|
||||
from moto.iam.models import ACCOUNT_ID
|
||||
from moto.core import ACCOUNT_ID
|
||||
from uuid import uuid4
|
||||
|
||||
|
||||
|
@ -4,7 +4,7 @@ import boto3
|
||||
import sure # noqa
|
||||
|
||||
from moto import mock_ec2
|
||||
from moto.iam.models import ACCOUNT_ID
|
||||
from moto.core import ACCOUNT_ID
|
||||
|
||||
|
||||
def get_subnet_id(conn):
|
||||
|
@ -15,7 +15,7 @@ from nose.tools import assert_raises
|
||||
import sure # noqa
|
||||
|
||||
from moto import mock_elb, mock_ec2, mock_elb_deprecated, mock_ec2_deprecated
|
||||
from moto.iam.models import ACCOUNT_ID
|
||||
from moto.core import ACCOUNT_ID
|
||||
|
||||
|
||||
@mock_elb_deprecated
|
||||
|
@ -10,7 +10,7 @@ import sure # noqa
|
||||
|
||||
from moto import mock_elbv2, mock_ec2, mock_acm, mock_cloudformation
|
||||
from moto.elbv2 import elbv2_backends
|
||||
from moto.iam.models import ACCOUNT_ID
|
||||
from moto.core import ACCOUNT_ID
|
||||
|
||||
|
||||
@mock_elbv2
|
||||
|
@ -6,7 +6,7 @@ import sure # noqa
|
||||
from moto.events import mock_events
|
||||
from botocore.exceptions import ClientError
|
||||
from nose.tools import assert_raises
|
||||
from moto.iam.models import ACCOUNT_ID
|
||||
from moto.core import ACCOUNT_ID
|
||||
|
||||
RULES = [
|
||||
{"Name": "test1", "ScheduleExpression": "rate(5 minutes)"},
|
||||
|
@ -13,7 +13,7 @@ from dateutil.tz import tzutc
|
||||
|
||||
from moto import mock_iam, mock_iam_deprecated
|
||||
from moto.iam.models import aws_managed_policies
|
||||
from moto.iam.models import ACCOUNT_ID
|
||||
from moto.core import ACCOUNT_ID
|
||||
from nose.tools import assert_raises, assert_equals
|
||||
from nose.tools import raises
|
||||
|
||||
|
@ -10,7 +10,7 @@ from nose.tools import assert_raises
|
||||
from boto.exception import BotoServerError
|
||||
from botocore.exceptions import ClientError
|
||||
from moto import mock_iam, mock_iam_deprecated
|
||||
from moto.iam.models import ACCOUNT_ID
|
||||
from moto.core import ACCOUNT_ID
|
||||
|
||||
MOCK_POLICY = """
|
||||
{
|
||||
|
@ -7,7 +7,7 @@ import boto3
|
||||
import sure # noqa
|
||||
|
||||
from moto import mock_kinesis
|
||||
from moto.iam.models import ACCOUNT_ID
|
||||
from moto.core import ACCOUNT_ID
|
||||
|
||||
|
||||
def create_s3_delivery_stream(client, stream_name):
|
||||
|
@ -8,7 +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
|
||||
from moto.core import ACCOUNT_ID
|
||||
|
||||
|
||||
@mock_kinesis_deprecated
|
||||
|
@ -18,7 +18,7 @@ from moto import mock_ec2
|
||||
from moto import mock_ec2_deprecated
|
||||
from moto import mock_redshift
|
||||
from moto import mock_redshift_deprecated
|
||||
from moto.iam.models import ACCOUNT_ID
|
||||
from moto.core import ACCOUNT_ID
|
||||
|
||||
@mock_redshift
|
||||
def test_create_cluster_boto3():
|
||||
|
@ -10,7 +10,7 @@ import sure # noqa
|
||||
from nose import tools
|
||||
from moto import mock_ses, mock_sns, mock_sqs
|
||||
from moto.ses.models import SESFeedback
|
||||
from moto.iam.models import ACCOUNT_ID
|
||||
from moto.core import ACCOUNT_ID
|
||||
|
||||
|
||||
@mock_ses
|
||||
|
@ -3,7 +3,7 @@ from __future__ import unicode_literals
|
||||
import boto
|
||||
from boto.exception import BotoServerError
|
||||
from moto import mock_sns_deprecated
|
||||
from moto.iam.models import ACCOUNT_ID
|
||||
from moto.core import ACCOUNT_ID
|
||||
import sure # noqa
|
||||
|
||||
|
||||
|
@ -4,7 +4,7 @@ import boto3
|
||||
from botocore.exceptions import ClientError
|
||||
from moto import mock_sns
|
||||
import sure # noqa
|
||||
from moto.iam.models import ACCOUNT_ID
|
||||
from moto.core import ACCOUNT_ID
|
||||
|
||||
|
||||
@mock_sns
|
||||
|
@ -7,7 +7,7 @@ from freezegun import freeze_time
|
||||
import sure # noqa
|
||||
|
||||
from moto import mock_sns_deprecated, mock_sqs_deprecated
|
||||
from moto.iam.models import ACCOUNT_ID
|
||||
from moto.core import ACCOUNT_ID
|
||||
|
||||
MESSAGE_FROM_SQS_TEMPLATE = '{\n "Message": "%s",\n "MessageId": "%s",\n "Signature": "EXAMPLElDMXvB8r9R83tGoNn0ecwd5UjllzsvSvbItzfaMpN2nk5HVSw7XnOn/49IkxDKz8YrlH2qJXj2iZB0Zo2O71c4qQk1fMUDi3LGpij7RCW7AW9vYYsSqIKRnFS94ilu7NFhUzLiieYr4BKHpdTmdD6c0esKEYBpabxDSc=",\n "SignatureVersion": "1",\n "SigningCertURL": "https://sns.us-east-1.amazonaws.com/SimpleNotificationService-f3ecfb7224c7233fe7bb5f59f96de52f.pem",\n "Subject": "%s",\n "Timestamp": "2015-01-01T12:00:00.000Z",\n "TopicArn": "arn:aws:sns:%s:'+ACCOUNT_ID+':some-topic",\n "Type": "Notification",\n "UnsubscribeURL": "https://sns.us-east-1.amazonaws.com/?Action=Unsubscribe&SubscriptionArn=arn:aws:sns:us-east-1:'+ACCOUNT_ID+':some-topic:2bcfbf39-05c3-41de-beaa-fcfcc21c8f55"\n}'
|
||||
|
||||
|
@ -12,7 +12,7 @@ import responses
|
||||
from botocore.exceptions import ClientError
|
||||
from nose.tools import assert_raises
|
||||
from moto import mock_sns, mock_sqs
|
||||
from moto.iam.models import ACCOUNT_ID
|
||||
from moto.core import ACCOUNT_ID
|
||||
|
||||
MESSAGE_FROM_SQS_TEMPLATE = '{\n "Message": "%s",\n "MessageId": "%s",\n "Signature": "EXAMPLElDMXvB8r9R83tGoNn0ecwd5UjllzsvSvbItzfaMpN2nk5HVSw7XnOn/49IkxDKz8YrlH2qJXj2iZB0Zo2O71c4qQk1fMUDi3LGpij7RCW7AW9vYYsSqIKRnFS94ilu7NFhUzLiieYr4BKHpdTmdD6c0esKEYBpabxDSc=",\n "SignatureVersion": "1",\n "SigningCertURL": "https://sns.us-east-1.amazonaws.com/SimpleNotificationService-f3ecfb7224c7233fe7bb5f59f96de52f.pem",\n "Subject": "my subject",\n "Timestamp": "2015-01-01T12:00:00.000Z",\n "TopicArn": "arn:aws:sns:%s:'+ACCOUNT_ID+':some-topic",\n "Type": "Notification",\n "UnsubscribeURL": "https://sns.us-east-1.amazonaws.com/?Action=Unsubscribe&SubscriptionArn=arn:aws:sns:us-east-1:'+ACCOUNT_ID+':some-topic:2bcfbf39-05c3-41de-beaa-fcfcc21c8f55"\n}'
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
from __future__ import unicode_literals
|
||||
from moto.iam.models import ACCOUNT_ID
|
||||
from moto.core import ACCOUNT_ID
|
||||
|
||||
import sure # noqa
|
||||
|
||||
|
@ -8,7 +8,7 @@ import sure # noqa
|
||||
from boto.exception import BotoServerError
|
||||
from moto import mock_sns_deprecated
|
||||
from moto.sns.models import DEFAULT_EFFECTIVE_DELIVERY_POLICY, DEFAULT_PAGE_SIZE
|
||||
from moto.iam.models import ACCOUNT_ID
|
||||
from moto.core import ACCOUNT_ID
|
||||
|
||||
|
||||
@mock_sns_deprecated
|
||||
|
@ -8,7 +8,7 @@ import sure # noqa
|
||||
from botocore.exceptions import ClientError
|
||||
from moto import mock_sns
|
||||
from moto.sns.models import DEFAULT_EFFECTIVE_DELIVERY_POLICY, DEFAULT_PAGE_SIZE
|
||||
from moto.iam.models import ACCOUNT_ID
|
||||
from moto.core import ACCOUNT_ID
|
||||
|
||||
@mock_sns
|
||||
def test_create_and_delete_topic():
|
||||
|
@ -21,7 +21,7 @@ from moto import mock_sqs, mock_sqs_deprecated, settings
|
||||
from nose import SkipTest
|
||||
from nose.tools import assert_raises
|
||||
from tests.helpers import requires_boto_gte
|
||||
from moto.iam.models import ACCOUNT_ID
|
||||
from moto.core import ACCOUNT_ID
|
||||
|
||||
@mock_sqs
|
||||
def test_create_fifo_queue_fail():
|
||||
|
@ -9,7 +9,7 @@ from botocore.exceptions import ClientError
|
||||
from nose.tools import assert_raises
|
||||
|
||||
from moto import mock_sts, mock_stepfunctions
|
||||
from moto.iam.models import ACCOUNT_ID
|
||||
from moto.core import ACCOUNT_ID
|
||||
|
||||
region = "us-east-1"
|
||||
simple_definition = (
|
||||
|
@ -10,7 +10,7 @@ import sure # noqa
|
||||
|
||||
|
||||
from moto import mock_sts, mock_sts_deprecated, mock_iam, settings
|
||||
from moto.iam.models import ACCOUNT_ID
|
||||
from moto.core import ACCOUNT_ID
|
||||
from moto.sts.responses import MAX_FEDERATION_TOKEN_POLICY_LENGTH
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user