From 8a56817e99383bd6a4d7f1d719979ef76bee47e5 Mon Sep 17 00:00:00 2001 From: brandon Date: Tue, 2 Apr 2024 12:59:51 -0700 Subject: [PATCH 1/2] makes test idempotent --- test/unit/test_actions.py | 1 + 1 file changed, 1 insertion(+) diff --git a/test/unit/test_actions.py b/test/unit/test_actions.py index 399bad5d..bc5e2573 100644 --- a/test/unit/test_actions.py +++ b/test/unit/test_actions.py @@ -4,6 +4,7 @@ def test_create_action(gl: ExperimentalApi): + gl.delete_all_rules() det = gl.get_or_create_detector("testing_detector", "test_query") rule = gl.create_rule(det, "test_rule", "EMAIL", "test@example.com") rule2 = gl.get_rule(rule.id) From a82e11ed669c1bc3b4d691145b254b472f5de973 Mon Sep 17 00:00:00 2001 From: brandon Date: Mon, 15 Apr 2024 16:18:51 -0700 Subject: [PATCH 2/2] adding comment --- test/unit/test_actions.py | 1 + 1 file changed, 1 insertion(+) diff --git a/test/unit/test_actions.py b/test/unit/test_actions.py index bc5e2573..e2156c4c 100644 --- a/test/unit/test_actions.py +++ b/test/unit/test_actions.py @@ -4,6 +4,7 @@ def test_create_action(gl: ExperimentalApi): + # We first clear out any rules in case the account has any left over from a previous test gl.delete_all_rules() det = gl.get_or_create_detector("testing_detector", "test_query") rule = gl.create_rule(det, "test_rule", "EMAIL", "test@example.com")