add test_api_module
This commit is contained in:
parent
7f87191f2a
commit
e8341cb899
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user