forked from p15670423/monkey
Island: Add a couple of island mode resource unit tests
This commit is contained in:
parent
2778b69dfb
commit
3bde6f013a
|
@ -0,0 +1,13 @@
|
||||||
|
import json
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
|
||||||
|
|
||||||
|
def test_island_mode_post(flask_client):
|
||||||
|
resp = flask_client.post('/api/island-mode', data=json.dumps({"mode": "ransomware"}), follow_redirects=True)
|
||||||
|
assert resp.status_code == 200
|
||||||
|
|
||||||
|
|
||||||
|
def test_island_mode_post__invalid_mode(flask_client):
|
||||||
|
with pytest.raises(TypeError):
|
||||||
|
flask_client.post('/api/island-mode', data=json.dumps({"mode": "bogus mode"}), follow_redirects=True)
|
Loading…
Reference in New Issue