moto/tests/test_mediapackage/test_server.py

29 lines
741 B
Python
Raw Normal View History

2021-10-18 19:44:29 +00:00
import sure # noqa # pylint: disable=unused-import
import moto.server as server
from moto import mock_mediapackage
"""
Test the different server responses
"""
@mock_mediapackage
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")
result.should.contain('"channels": []')
@mock_mediapackage
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")
result.should.contain('"originEndpoints": []')