def test_no_pulls(self): repo = mock.Mock(full_name='repo') reports._normal_callback(1, 3, repo) self.assertEqual(sys.stderr.getvalue(), 'Processing repository "repo" (2/3)...\n')
def test_with_pulls(self): repo = mock.Mock(full_name='repo') pulls = [ mock.Mock(mergeable=True), mock.Mock(mergeable=False), mock.Mock(mergeable=True), ] reports._normal_callback(1, 3, repo, pulls) self.assertEqual(sys.stderr.getvalue(), '')