Skip to content

Commit

Permalink
chore(issues): Remove impossible branch (#70562)
Browse files Browse the repository at this point in the history
Since the first line of `process_event_and_issue_occurrence` reads from
`event_data` this can't possibly ever be `None`.
  • Loading branch information
mrduncan committed May 10, 2024
1 parent 830365b commit 89c7279
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions tests/sentry/issues/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,18 +68,17 @@ def build_occurrence(self, **overrides: Any) -> IssueOccurrence:
return IssueOccurrence.from_dict(self.build_occurrence_data(**overrides))

def process_occurrence(
self, event_data: dict[str, Any] | None = None, **overrides
self, event_data: dict[str, Any], **overrides
) -> tuple[IssueOccurrence, GroupInfo | None]:
"""
Testutil to build and process occurrence data instead of going through Kafka.
This ensures the occurrence data is well-formed.
"""
occurrence_data = self.build_occurrence_data(**overrides)
if event_data:
if "event_id" not in event_data:
event_data["event_id"] = occurrence_data["event_id"]
if "project_id" not in event_data:
event_data["project_id"] = occurrence_data["project_id"]
if "event_id" not in event_data:
event_data["event_id"] = occurrence_data["event_id"]
if "project_id" not in event_data:
event_data["project_id"] = occurrence_data["project_id"]
return process_event_and_issue_occurrence(occurrence_data, event_data)


Expand Down

0 comments on commit 89c7279

Please sign in to comment.