2021-10-13 22:22:31 +00:00
|
|
|
"""Test different server responses."""
|
|
|
|
import json
|
2021-10-18 19:44:29 +00:00
|
|
|
import sure # noqa # pylint: disable=unused-import
|
2021-10-13 22:22:31 +00:00
|
|
|
|
|
|
|
import moto.server as server
|
|
|
|
from moto import mock_cloudtrail
|
|
|
|
|
|
|
|
|
|
|
|
@mock_cloudtrail
|
|
|
|
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)
|
|
|
|
data.should.equal({"Trails": []})
|