2014-08-27 15:17:06 +00:00
|
|
|
from __future__ import unicode_literals
|
2015-08-03 20:48:15 +00:00
|
|
|
|
|
|
|
import sure # noqa
|
|
|
|
|
|
|
|
import moto.server as server
|
|
|
|
|
|
|
|
'''
|
|
|
|
Test the different server responses
|
|
|
|
'''
|
|
|
|
|
|
|
|
|
|
|
|
def test_sns_server_get():
|
|
|
|
backend = server.create_backend_app("sns")
|
|
|
|
test_client = backend.test_client()
|
|
|
|
|
2017-11-13 18:27:11 +00:00
|
|
|
topic_data = test_client.action_data("CreateTopic", Name="testtopic")
|
2015-08-20 15:12:25 +00:00
|
|
|
topic_data.should.contain("CreateTopicResult")
|
2017-02-24 02:37:43 +00:00
|
|
|
topic_data.should.contain(
|
2017-11-13 18:27:11 +00:00
|
|
|
"<TopicArn>arn:aws:sns:us-east-1:123456789012:testtopic</TopicArn>")
|
2015-08-03 20:48:15 +00:00
|
|
|
|
2015-08-20 15:12:25 +00:00
|
|
|
topics_data = test_client.action_data("ListTopics")
|
|
|
|
topics_data.should.contain("ListTopicsResult")
|
2017-02-24 02:37:43 +00:00
|
|
|
topic_data.should.contain(
|
2017-11-13 18:27:11 +00:00
|
|
|
"<TopicArn>arn:aws:sns:us-east-1:123456789012:testtopic</TopicArn>")
|