Skip to content

Commit

Permalink
create an association with the project rather than using a hardcoded 1
Browse files Browse the repository at this point in the history
  • Loading branch information
saponifi3d committed Nov 16, 2024
1 parent 5bb0677 commit 54245f9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/sentry/workflow_engine/processors/test_detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ def tearDown(self):
def create_detector_and_conditions(self, type: str | None = None):
if type is None:
type = "handler_with_state"
self.project = self.create_project()
detector = self.create_detector(
project=self.project,
workflow_condition_group=self.create_data_condition_group(),
type=type,
)
Expand Down Expand Up @@ -464,7 +466,7 @@ def test_above_below_threshold(self):
is_active=False,
result=StatusChangeMessage(
fingerprint=[f"{handler.detector.id}:val1"],
project_id=1,
project_id=self.project.id,
new_status=1,
new_substatus=None,
),
Expand Down Expand Up @@ -613,7 +615,7 @@ def test_status_change(self):
DetectorPriorityLevel.OK,
result=StatusChangeMessage(
fingerprint=[f"{handler.detector.id}:group_key"],
project_id=1,
project_id=self.project.id,
new_status=1,
new_substatus=None,
),
Expand Down

0 comments on commit 54245f9

Please sign in to comment.