Island: Test both "ransomware" and "advanced" modes

This commit is contained in:
Mike Salvatore 2021-07-13 10:49:15 -04:00
parent 7549e64b41
commit 26d3782a66
1 changed files with 3 additions and 2 deletions

View File

@ -12,9 +12,10 @@ def uses_database():
IslandMode.objects().delete()
def test_island_mode_post(flask_client):
@pytest.mark.parametrize("mode", ["ransomware", "advanced"])
def test_island_mode_post(flask_client, mode):
resp = flask_client.post(
"/api/island-mode", data=json.dumps({"mode": "ransomware"}), follow_redirects=True
"/api/island-mode", data=json.dumps({"mode": mode}), follow_redirects=True
)
assert resp.status_code == 200