@@ -334,7 +334,7 @@ def test_fileify_logging_when_wrong_version_pk(self, mock_logger):
334
334
mock_logger .warning .assert_called_with ("Version not found for given kwargs. {'pk': 345343}" )
335
335
336
336
@patch ('readthedocs.projects.tasks.GitHubService.send_build_status' )
337
- def test_send_build_status_task (self , send_build_status ):
337
+ def test_send_build_status_task_with_remote_repo (self , send_build_status ):
338
338
social_account = get (SocialAccount , provider = 'github' )
339
339
remote_repo = get (RemoteRepository , account = social_account , project = self .project )
340
340
remote_repo .users .add (self .eric )
@@ -348,7 +348,22 @@ def test_send_build_status_task(self, send_build_status):
348
348
send_build_status .assert_called_once_with (external_build , BUILD_STATUS_SUCCESS )
349
349
350
350
@patch ('readthedocs.projects.tasks.GitHubService.send_build_status' )
351
- def test_send_build_status_task_without_remote_repo (self , send_build_status ):
351
+ def test_send_build_status_task_with_social_account (self , send_build_status ):
352
+ social_account = get (SocialAccount , user = self .eric , provider = 'github' )
353
+
354
+ self .project .repo = 'https://github.com/test/test/'
355
+ self .project .save ()
356
+
357
+ external_version = get (Version , project = self .project , type = EXTERNAL )
358
+ external_build = get (
359
+ Build , project = self .project , version = external_version
360
+ )
361
+ tasks .send_build_status (external_build .id , BUILD_STATUS_SUCCESS )
362
+
363
+ send_build_status .assert_called_once_with (external_build , BUILD_STATUS_SUCCESS )
364
+
365
+ @patch ('readthedocs.projects.tasks.GitHubService.send_build_status' )
366
+ def test_send_build_status_task_without_remote_repo_or_social_account (self , send_build_status ):
352
367
external_version = get (Version , project = self .project , type = EXTERNAL )
353
368
external_build = get (
354
369
Build , project = self .project , version = external_version
0 commit comments