Skip to content

Commit 219563a

Browse files
committed
ok now i'm annoyed
1 parent 58ebc11 commit 219563a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/unit/test_actions.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,11 @@ def test_create_alert_webhook_action_with_invalid_payload_template(gl_experiment
138138
url="https://groundlight.ai", include_image=True, payload_template=payload_template
139139
)
140140

141+
bad_request_exception_status_code = 400
142+
141143
with pytest.raises(ApiException) as e:
142144
gl_experimental.create_alert(det, f"test_alert_{name}", condition, webhook_actions=webhook_action)
143-
assert e.value.status == 400
145+
assert e.value.status == bad_request_exception_status_code
144146

145147
payload_template = gl_experimental.make_payload_template(
146148
"This should not be a valid payload, it's valid jinja but won't produce valid json"
@@ -151,4 +153,4 @@ def test_create_alert_webhook_action_with_invalid_payload_template(gl_experiment
151153

152154
with pytest.raises(ApiException) as e:
153155
gl_experimental.create_alert(det, f"test_alert_{name}", condition, webhook_actions=webhook_action)
154-
assert e.value.status == 400
156+
assert e.value.status == bad_request_exception_status_code

0 commit comments

Comments
 (0)