Testing new version of decorator.
This commit is contained in:
parent
d3df810065
commit
fde721bed7
123 changed files with 2740 additions and 1114 deletions
|
|
@ -5,11 +5,11 @@ import six
|
|||
import sure # noqa
|
||||
|
||||
from boto.exception import BotoServerError
|
||||
from moto import mock_sns
|
||||
from moto import mock_sns_deprecated
|
||||
from moto.sns.models import DEFAULT_TOPIC_POLICY, DEFAULT_EFFECTIVE_DELIVERY_POLICY, DEFAULT_PAGE_SIZE
|
||||
|
||||
|
||||
@mock_sns
|
||||
@mock_sns_deprecated
|
||||
def test_create_and_delete_topic():
|
||||
conn = boto.connect_sns()
|
||||
conn.create_topic("some-topic")
|
||||
|
|
@ -31,20 +31,20 @@ def test_create_and_delete_topic():
|
|||
topics.should.have.length_of(0)
|
||||
|
||||
|
||||
@mock_sns
|
||||
@mock_sns_deprecated
|
||||
def test_get_missing_topic():
|
||||
conn = boto.connect_sns()
|
||||
conn.get_topic_attributes.when.called_with("a-fake-arn").should.throw(BotoServerError)
|
||||
|
||||
|
||||
@mock_sns
|
||||
@mock_sns_deprecated
|
||||
def test_create_topic_in_multiple_regions():
|
||||
for region in ['us-west-1', 'us-west-2']:
|
||||
conn = boto.sns.connect_to_region(region)
|
||||
conn.create_topic("some-topic")
|
||||
list(conn.get_all_topics()["ListTopicsResponse"]["ListTopicsResult"]["Topics"]).should.have.length_of(1)
|
||||
|
||||
@mock_sns
|
||||
@mock_sns_deprecated
|
||||
def test_topic_corresponds_to_region():
|
||||
for region in ['us-east-1', 'us-west-2']:
|
||||
conn = boto.sns.connect_to_region(region)
|
||||
|
|
@ -53,7 +53,7 @@ def test_topic_corresponds_to_region():
|
|||
topic_arn = topics_json["ListTopicsResponse"]["ListTopicsResult"]["Topics"][0]['TopicArn']
|
||||
topic_arn.should.equal("arn:aws:sns:{0}:123456789012:some-topic".format(region))
|
||||
|
||||
@mock_sns
|
||||
@mock_sns_deprecated
|
||||
def test_topic_attributes():
|
||||
conn = boto.connect_sns()
|
||||
conn.create_topic("some-topic")
|
||||
|
|
@ -95,7 +95,7 @@ def test_topic_attributes():
|
|||
attributes["DisplayName"].should.equal("My display name")
|
||||
attributes["DeliveryPolicy"].should.equal("{'http': {'defaultHealthyRetryPolicy': {'numRetries': 5}}}")
|
||||
|
||||
@mock_sns
|
||||
@mock_sns_deprecated
|
||||
def test_topic_paging():
|
||||
conn = boto.connect_sns()
|
||||
for index in range(DEFAULT_PAGE_SIZE + int(DEFAULT_PAGE_SIZE / 2)):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue