Example #1
0
    def test_no_pulls(self):
        repo = mock.Mock(full_name='repo')

        reports._verbose_callback(1, 3, repo)

        self.assertEqual(sys.stderr.getvalue(),
                         'Processing repository "repo" (2/3)... ')
Example #2
0
    def test_no_pulls(self):
        repo = mock.Mock(full_name='repo')

        reports._verbose_callback(1, 3, repo)

        self.assertEqual(sys.stderr.getvalue(),
                         'Processing repository "repo" (2/3)... ')
Example #3
0
    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._verbose_callback(1, 3, repo, pulls)

        self.assertEqual(sys.stderr.getvalue(), '3 pulls (2 mergeable)\n')
Example #4
0
    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._verbose_callback(1, 3, repo, pulls)

        self.assertEqual(sys.stderr.getvalue(), '3 pulls (2 mergeable)\n')