moto/tests/test_cloudtrail/test_server.py

20 lines
472 B
Python
Raw Normal View History

2021-10-13 22:22:31 +00:00
"""Test different server responses."""
2021-10-13 22:22:31 +00:00
import json
import moto.server as server
2024-01-07 12:03:33 +00:00
from moto import mock_aws
2021-10-13 22:22:31 +00:00
2024-01-07 12:03:33 +00:00
@mock_aws
2021-10-13 22:22:31 +00:00
def test_cloudtrail_list():
backend = server.create_backend_app("cloudtrail")
test_client = backend.test_client()
headers = {
"X-Amz-Target": "com.amazonaws.cloudtrail.v20131101.CloudTrail_20131101.ListTrails"
}
res = test_client.post("/", headers=headers)
data = json.loads(res.data)
assert data == {"Trails": []}