Fix tests for py26 and py3.
This commit is contained in:
parent
a22caf27ab
commit
1287d53817
@ -28,7 +28,7 @@ class Topic(object):
|
||||
self.display_name = ""
|
||||
self.policy = json.dumps(DEFAULT_TOPIC_POLICY)
|
||||
self.delivery_policy = ""
|
||||
self.effective_delivery_policy = DEFAULT_EFFECTIVE_DELIVERY_POLICY
|
||||
self.effective_delivery_policy = json.dumps(DEFAULT_EFFECTIVE_DELIVERY_POLICY)
|
||||
self.arn = make_arn_for_topic(
|
||||
self.account_id, name, sns_backend.region_name)
|
||||
|
||||
@ -317,7 +317,7 @@ DEFAULT_TOPIC_POLICY = {
|
||||
}]
|
||||
}
|
||||
|
||||
DEFAULT_EFFECTIVE_DELIVERY_POLICY = json.dumps({
|
||||
DEFAULT_EFFECTIVE_DELIVERY_POLICY = {
|
||||
'http': {
|
||||
'disableSubscriptionOverrides': False,
|
||||
'defaultHealthyRetryPolicy': {
|
||||
@ -330,4 +330,4 @@ DEFAULT_EFFECTIVE_DELIVERY_POLICY = json.dumps({
|
||||
'backoffFunction': 'linear'
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ from freezegun import freeze_time
|
||||
import sure # noqa
|
||||
|
||||
from moto.packages.responses import responses
|
||||
from moto import mock_sns, mock_sns_deprecated, mock_sqs_deprecated
|
||||
from moto import mock_sns_deprecated, mock_sqs_deprecated
|
||||
|
||||
|
||||
@mock_sqs_deprecated
|
||||
@ -54,7 +54,6 @@ def test_publish_to_sqs_in_different_region():
|
||||
|
||||
|
||||
@freeze_time("2013-01-01")
|
||||
@mock_sns
|
||||
@mock_sns_deprecated
|
||||
def test_publish_to_http():
|
||||
responses.add(
|
||||
|
@ -82,7 +82,7 @@ def test_topic_attributes():
|
||||
attributes["SubscriptionsConfirmed"].should.equal(0)
|
||||
attributes["SubscriptionsDeleted"].should.equal(0)
|
||||
attributes["DeliveryPolicy"].should.equal("")
|
||||
attributes["EffectiveDeliveryPolicy"].should.equal(
|
||||
json.loads(attributes["EffectiveDeliveryPolicy"]).should.equal(
|
||||
DEFAULT_EFFECTIVE_DELIVERY_POLICY)
|
||||
|
||||
# boto can't handle prefix-mandatory strings:
|
||||
|
@ -78,7 +78,7 @@ def test_topic_attributes():
|
||||
attributes["SubscriptionsConfirmed"].should.equal('0')
|
||||
attributes["SubscriptionsDeleted"].should.equal('0')
|
||||
attributes["DeliveryPolicy"].should.equal("")
|
||||
attributes["EffectiveDeliveryPolicy"].should.equal(
|
||||
json.loads(attributes["EffectiveDeliveryPolicy"]).should.equal(
|
||||
DEFAULT_EFFECTIVE_DELIVERY_POLICY)
|
||||
|
||||
# boto can't handle prefix-mandatory strings:
|
||||
|
Loading…
x
Reference in New Issue
Block a user