Skip to content

Commit 050df12

Browse files
fixed tests
1 parent 319461a commit 050df12

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

tests/sentry/tasks/test_post_process.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3108,12 +3108,16 @@ def test_triage_signals_event_count_less_than_10_with_cache(
31083108
"sentry.seer.seer_setup.get_seer_org_acknowledgement_for_scanner",
31093109
return_value=True,
31103110
)
3111+
@patch(
3112+
"sentry.seer.autofix.utils.get_autofix_repos_from_project_code_mappings",
3113+
return_value=[{"name": "test-repo"}],
3114+
)
31113115
@patch("sentry.tasks.autofix.run_automation_only_task.delay")
31123116
@with_feature(
31133117
{"organizations:gen-ai-features": True, "organizations:triage-signals-v0-org": True}
31143118
)
31153119
def test_triage_signals_event_count_gte_10_with_cache(
3116-
self, mock_run_automation, mock_get_seer_org_acknowledgement
3120+
self, mock_run_automation, mock_get_repos, mock_get_seer_org_acknowledgement
31173121
):
31183122
"""Test that with event count >= 10 and cached summary exists, we run automation directly."""
31193123
self.project.update_option("sentry:seer_scanner_automation", True)
@@ -3157,12 +3161,19 @@ def mock_buffer_get(model, columns, filters):
31573161
"sentry.seer.seer_setup.get_seer_org_acknowledgement_for_scanner",
31583162
return_value=True,
31593163
)
3164+
@patch(
3165+
"sentry.seer.autofix.utils.get_autofix_repos_from_project_code_mappings",
3166+
return_value=[{"name": "test-repo"}],
3167+
)
31603168
@patch("sentry.tasks.autofix.generate_summary_and_run_automation.delay")
31613169
@with_feature(
31623170
{"organizations:gen-ai-features": True, "organizations:triage-signals-v0-org": True}
31633171
)
31643172
def test_triage_signals_event_count_gte_10_no_cache(
3165-
self, mock_generate_summary_and_run_automation, mock_get_seer_org_acknowledgement
3173+
self,
3174+
mock_generate_summary_and_run_automation,
3175+
mock_get_repos,
3176+
mock_get_seer_org_acknowledgement,
31663177
):
31673178
"""Test that with event count >= 10 and no cached summary, we generate summary + run automation."""
31683179
self.project.update_option("sentry:seer_scanner_automation", True)

0 commit comments

Comments
 (0)