diff --git a/tests/test_pub1c-rest.py b/tests/test_pub1c-rest.py index f0fed14..07ba624 100644 --- a/tests/test_pub1c-rest.py +++ b/tests/test_pub1c-rest.py @@ -98,3 +98,19 @@ def test_api_config(client): actual.sort() assert actual == expected + +def test_api_module(client): + endpoint = '/api/v1/module' + # test when module not added + response = client.get(endpoint) + assert 404 == response.status_code + # add module + response = client.put(endpoint) + assert 200 == response.status_code + # test when module added + response = client.get(endpoint) + assert 200 == response.status_code + # try to add module again + response = client.put(endpoint) + assert 304 == response.status_code +