moto/tests/test_cloudfront/test_server.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
411 B
Python
Raw Normal View History

2021-11-29 14:35:43 +00:00
import xmltodict
import moto.server as server
2024-01-07 12:03:33 +00:00
from moto import mock_aws
2021-11-29 14:35:43 +00:00
2024-01-07 12:03:33 +00:00
@mock_aws
2021-11-29 14:35:43 +00:00
def test_cloudfront_list():
backend = server.create_backend_app("cloudfront")
test_client = backend.test_client()
res = test_client.get("/2020-05-31/distribution")
data = xmltodict.parse(res.data, dict_constructor=dict)
assert "DistributionList" in data
assert "Items" not in data["DistributionList"]