add test_api_restart_flag
This commit is contained in:
parent
b2e2cda3ea
commit
92d495dfd5
@ -58,3 +58,17 @@ def test_api_index(client):
|
|||||||
data = response.get_json()
|
data = response.get_json()
|
||||||
assert data == ['infobases-available', 'infobases-all', 'publications',
|
assert data == ['infobases-available', 'infobases-all', 'publications',
|
||||||
'module', 'config', 'config-test', 'apache-restart']
|
'module', 'config', 'config-test', 'apache-restart']
|
||||||
|
|
||||||
|
|
||||||
|
def test_api_restart_flag(client):
|
||||||
|
endpoint = '/api/v1/apache-restart'
|
||||||
|
# test when flag not set
|
||||||
|
response = client.get(endpoint)
|
||||||
|
assert 404 == response.status_code
|
||||||
|
# set flag
|
||||||
|
response = client.put(endpoint)
|
||||||
|
assert 200 == response.status_code
|
||||||
|
# test when flag is set
|
||||||
|
response = client.get(endpoint)
|
||||||
|
assert 200 == response.status_code
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user