Skip to content

Commit

Permalink
fixed bad tests
Browse files Browse the repository at this point in the history
  • Loading branch information
f-wright committed Feb 22, 2025
1 parent 89f0159 commit d3d131e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/unit/test_actions.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from datetime import datetime

import pytest
from groundlight import ExperimentalApi
from groundlight import ExperimentalApi, ApiException
from groundlight_openapi_client.exceptions import NotFoundException


Expand Down Expand Up @@ -138,9 +138,9 @@ def test_create_alert_webhook_action_with_invalid_payload_template(gl_experiment
url="https://groundlight.ai", include_image=True, payload_template=payload_template
)

with pytest.raises(Exception) as e:
with pytest.raises(ApiException) as e:
gl_experimental.create_alert(det, f"test_alert_{name}", condition, webhook_actions=webhook_action)
assert e.value.status_code == 400
assert e.value.status == 400

payload_template = gl_experimental.make_payload_template(
"This should not be a valid payload, it's valid jinja but won't produce valid json"
Expand All @@ -149,6 +149,6 @@ def test_create_alert_webhook_action_with_invalid_payload_template(gl_experiment
url="https://groundlight.ai", include_image=True, payload_template=payload_template
)

with pytest.raises(Exception) as e:
with pytest.raises(ApiException) as e:
gl_experimental.create_alert(det, f"test_alert_{name}", condition, webhook_actions=webhook_action)
assert e.value.status_code == 400
assert e.value.status == 400

0 comments on commit d3d131e

Please sign in to comment.