Skip to content

Commit 1c56a1b

Browse files
committedMar 14, 2025
verify status codes in tests
1 parent 9839f89 commit 1c56a1b

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed
 

‎tests/sentry/workflow_engine/endpoints/test_organization_data_condition_index.py

+3-5
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def test_type_filter(self):
7373
}
7474

7575
response = self.get_success_response(
76-
self.organization.slug, type=DataConditionHandler.Type.ACTION_FILTER
76+
self.organization.slug, type=DataConditionHandler.Type.ACTION_FILTER, status_code=200
7777
)
7878
assert len(response.data) == 1
7979
assert response.data[0] == {
@@ -91,9 +91,7 @@ def test_type_filter(self):
9191
}
9292

9393
def test_invalid_type(self):
94-
response = self.get_error_response(self.organization.slug, type="invalid")
95-
assert response.status_code == 400
94+
self.get_error_response(self.organization.slug, type="invalid", status_code=400)
9695

9796
def test_no_type(self):
98-
response = self.get_error_response(self.organization.slug)
99-
assert response.status_code == 400
97+
self.get_error_response(self.organization.slug, status_code=400)

0 commit comments

Comments
 (0)