From 26d3782a666db22095f01182f469a350d2961a73 Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Tue, 13 Jul 2021 10:49:15 -0400 Subject: [PATCH] Island: Test both "ransomware" and "advanced" modes --- .../monkey_island/cc/resources/test_island_mode.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/monkey/tests/unit_tests/monkey_island/cc/resources/test_island_mode.py b/monkey/tests/unit_tests/monkey_island/cc/resources/test_island_mode.py index df4e9c25a..9bd4d8dd3 100644 --- a/monkey/tests/unit_tests/monkey_island/cc/resources/test_island_mode.py +++ b/monkey/tests/unit_tests/monkey_island/cc/resources/test_island_mode.py @@ -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