moto/tests/test_mediapackage/test_server.py

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

29 lines
686 B
Python
Raw Permalink Normal View History

import json
import moto.server as server
2024-01-07 12:03:33 +00:00
from moto import mock_aws
"""
Test the different server responses
"""
2024-01-07 12:03:33 +00:00
@mock_aws
def test_mediapackage_list_channels():
backend = server.create_backend_app("mediapackage")
test_client = backend.test_client()
res = test_client.get("/channels")
result = res.data.decode("utf-8")
assert json.loads(result) == {"channels": []}
2024-01-07 12:03:33 +00:00
@mock_aws
def test_mediapackage_list_origin_endpoints():
backend = server.create_backend_app("mediapackage")
test_client = backend.test_client()
res = test_client.get("/origin_endpoints")
result = res.data.decode("utf-8")
assert json.loads(result) == {"originEndpoints": []}