Merge pull request #390 from jotes/iam_sns_server
Added server backends with tests for IAM and SNS services.
This commit is contained in:
commit
ed38a296db
6 changed files with 86 additions and 20 deletions
|
|
@ -1 +1,24 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
import json
|
||||
|
||||
import re
|
||||
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()
|
||||
|
||||
topic_data = test_client.action_json("CreateTopic", Name="test topic")
|
||||
topic_arn = topic_data["CreateTopicResponse"]["CreateTopicResult"]["TopicArn"]
|
||||
topics_data = test_client.action_json("ListTopics")
|
||||
topics_arns = [t["TopicArn"] for t in topics_data["ListTopicsResponse"]["ListTopicsResult"]["Topics"]]
|
||||
|
||||
assert topic_arn in topics_arns
|
||||
Loading…
Add table
Add a link
Reference in a new issue