@@ -240,7 +240,7 @@ def setUp(self):
240240 self .secret = "b3002c3e321d4b7880360d397db2ccfd"
241241 options .set ("github-app.webhook-secret" , self .secret )
242242
243- def _setup_repo_test (self , project ):
243+ def _create_integration_and_send_push_event (self ):
244244 future_expires = datetime .now ().replace (microsecond = 0 ) + timedelta (minutes = 5 )
245245 with assume_test_silo_mode (SiloMode .CONTROL ):
246246 integration = self .create_integration (
@@ -305,7 +305,7 @@ def test_simple(self, mock_record):
305305 name = "baxterthehacker/repo" ,
306306 )
307307
308- self ._setup_repo_test ( self . project )
308+ self ._create_integration_and_send_push_event ( )
309309
310310 commit_list = list (
311311 Commit .objects .filter (
@@ -349,7 +349,7 @@ def test_simple(self, mock_record):
349349 @responses .activate
350350 @patch ("sentry.integrations.github.webhook.metrics" )
351351 def test_creates_missing_repo (self , mock_metrics ):
352- self ._setup_repo_test ( self . project )
352+ self ._create_integration_and_send_push_event ( )
353353
354354 repos = Repository .objects .all ()
355355 assert len (repos ) == 1
@@ -369,7 +369,7 @@ def test_ignores_hidden_repo(self):
369369 repo .external_id = "35129377"
370370 repo .save ()
371371
372- self ._setup_repo_test ( self . project )
372+ self ._create_integration_and_send_push_event ( )
373373
374374 repos = Repository .objects .all ()
375375 assert len (repos ) == 1
@@ -391,7 +391,7 @@ def test_anonymous_lookup(self):
391391 name = "bàxterthehacker" ,
392392 )
393393
394- self ._setup_repo_test ( self . project )
394+ self ._create_integration_and_send_push_event ( )
395395
396396 commit_list = list (
397397 Commit .objects .filter (organization_id = self .project .organization .id )
@@ -576,7 +576,7 @@ def setUp(self):
576576 self .secret = "b3002c3e321d4b7880360d397db2ccfd"
577577 options .set ("github-app.webhook-secret" , self .secret )
578578
579- def _setup_repo_test (self , project ):
579+ def _create_integration_and_send_pull_request_opened_event (self ):
580580 future_expires = datetime .now ().replace (microsecond = 0 ) + timedelta (minutes = 5 )
581581 with assume_test_silo_mode (SiloMode .CONTROL ):
582582 integration = self .create_integration (
@@ -643,7 +643,7 @@ def test_opened(self, mock_record, mock_metrics, mock_open_pr_comment_workflow_d
643643 name = "baxterthehacker/public-repo" ,
644644 )
645645
646- self ._setup_repo_test ( self . project )
646+ self ._create_integration_and_send_pull_request_opened_event ( )
647647
648648 prs = PullRequest .objects .filter (
649649 repository_id = repo .id , organization_id = self .project .organization .id
@@ -685,14 +685,14 @@ def test_opened_missing_option(self, mock_metrics):
685685 organization = self .organization , key = "sentry:github_open_pr_bot" , value = False
686686 )
687687
688- self ._setup_repo_test ( self . project )
688+ self ._create_integration_and_send_pull_request_opened_event ( )
689689
690690 assert mock_metrics .incr .call_count == 0
691691
692692 @patch ("sentry.integrations.github.webhook.metrics" )
693693 def test_creates_missing_repo (self , mock_metrics ):
694694
695- self ._setup_repo_test ( self . project )
695+ self ._create_integration_and_send_pull_request_opened_event ( )
696696
697697 repos = Repository .objects .all ()
698698 assert len (repos ) == 1
@@ -713,7 +713,7 @@ def test_ignores_hidden_repo(self):
713713 repo .external_id = "35129377"
714714 repo .save ()
715715
716- self ._setup_repo_test ( self . project )
716+ self ._create_integration_and_send_pull_request_opened_event ( )
717717
718718 repos = Repository .objects .all ()
719719 assert len (repos ) == 1
0 commit comments