moto/tests/test_kms/test_server.py

22 lines
457 B
Python
Raw Normal View History

2015-06-30 09:44:39 +00:00
import json
2021-10-18 19:44:29 +00:00
import sure # noqa # pylint: disable=unused-import
2015-06-30 09:44:39 +00:00
import moto.server as server
from moto import mock_kms
2019-10-31 15:44:26 +00:00
"""
2015-06-30 09:44:39 +00:00
Test the different server responses
2019-10-31 15:44:26 +00:00
"""
2015-06-30 09:44:39 +00:00
@mock_kms
def test_list_keys():
backend = server.create_backend_app("kms")
test_client = backend.test_client()
2019-10-31 15:44:26 +00:00
res = test_client.get("/?Action=ListKeys")
2015-06-30 09:44:39 +00:00
2019-10-31 15:44:26 +00:00
json.loads(res.data.decode("utf-8")).should.equal(
{"Keys": [], "NextMarker": None, "Truncated": False}
)