2015-06-30 09:44:39 +00:00
|
|
|
import json
|
|
|
|
|
|
|
|
import moto.server as server
|
2024-01-07 12:03:33 +00:00
|
|
|
from moto import mock_aws
|
2015-06-30 09:44:39 +00:00
|
|
|
|
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
|
|
|
|
|
|
|
|
2024-01-07 12:03:33 +00:00
|
|
|
@mock_aws
|
2015-06-30 09:44:39 +00:00
|
|
|
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")
|
2023-08-02 09:41:44 +00:00
|
|
|
body = json.loads(res.data.decode("utf-8"))
|
2015-06-30 09:44:39 +00:00
|
|
|
|
2023-08-02 09:41:44 +00:00
|
|
|
assert body == {"Keys": [], "NextMarker": None, "Truncated": False}
|