SNS now supports all modern boto3 regions.

This commit is contained in:
Mike Grima 2018-04-18 11:24:31 -07:00
parent ba3c9db8a7
commit 794b8ba59e

View File

@ -4,11 +4,12 @@ import datetime
import uuid import uuid
import json import json
import boto.sns
import requests import requests
import six import six
import re import re
from boto3 import Session
from moto.compat import OrderedDict from moto.compat import OrderedDict
from moto.core import BaseBackend, BaseModel from moto.core import BaseBackend, BaseModel
from moto.core.utils import iso_8601_datetime_with_milliseconds from moto.core.utils import iso_8601_datetime_with_milliseconds
@ -410,8 +411,8 @@ class SNSBackend(BaseBackend):
sns_backends = {} sns_backends = {}
for region in boto.sns.regions(): for region in Session().get_available_regions('sns'):
sns_backends[region.name] = SNSBackend(region.name) sns_backends[region] = SNSBackend(region)
DEFAULT_TOPIC_POLICY = { DEFAULT_TOPIC_POLICY = {