def test_sync_repository_failsync(self, sync_bb, sync_gl, sync_gh):
     sync_gh.side_effect = SyncServiceError
     r = sync_remote_repositories(self.user.pk)
     self.assertIn('GitHub', r['error'])
     self.assertNotIn('GitLab', r['error'])
     self.assertNotIn('Bitbucket', r['error'])
     sync_bb.assert_called_once()
     sync_gl.assert_called_once()
     sync_gh.assert_called_once()
 def test_sync_repository_failsync(self, sync_bb, sync_gl, sync_gh):
     sync_gh.side_effect = SyncServiceError
     r = sync_remote_repositories(self.user.pk)
     self.assertIn('GitHub', r['error'])
     self.assertNotIn('GitLab', r['error'])
     self.assertNotIn('Bitbucket', r['error'])
     sync_bb.assert_called_once()
     sync_gl.assert_called_once()
     sync_gh.assert_called_once()
 def test_sync_repository(self, sync_bb, sync_gl, sync_gh):
     r = sync_remote_repositories(self.user.pk)
     self.assertNotIn('error', r)
     sync_bb.assert_called_once()
     sync_gl.assert_called_once()
     sync_gh.assert_called_once()
 def test_sync_repository(self, sync_bb, sync_gl, sync_gh):
     r = sync_remote_repositories(self.user.pk)
     self.assertNotIn('error', r)
     sync_bb.assert_called_once()
     sync_gl.assert_called_once()
     sync_gh.assert_called_once()