2023-08-13 18:52:36 +00:00
|
|
|
import json
|
2021-03-12 14:56:25 +00:00
|
|
|
|
|
|
|
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")
|
2023-08-13 18:52:36 +00:00
|
|
|
assert json.loads(result) == {"channels": []}
|
2021-03-12 14:56:25 +00:00
|
|
|
|
|
|
|
|
|
|
|
@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")
|
2023-08-13 18:52:36 +00:00
|
|
|
assert json.loads(result) == {"originEndpoints": []}
|