moto/tests/test_sts/test_server.py
2014-03-20 18:46:03 +02:00

28 lines
716 B
Python

import sure # noqa
import moto.server as server
'''
Test the different server responses
'''
def test_sts_get_session_token():
backend = server.create_backend_app("sts")
test_client = backend.test_client()
res = test_client.get('/?Action=GetSessionToken')
res.status_code.should.equal(200)
res.data.should.contain("SessionToken")
res.data.should.contain("AccessKeyId")
def test_sts_get_federation_token():
backend = server.create_backend_app("sts")
test_client = backend.test_client()
res = test_client.get('/?Action=GetFederationToken&Name=Bob')
res.status_code.should.equal(200)
res.data.should.contain("SessionToken")
res.data.should.contain("AccessKeyId")