Пример #1
0
    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')
Пример #2
0
    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')
Пример #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._normal_callback(1, 3, repo, pulls)

        self.assertEqual(sys.stderr.getvalue(), '')
Пример #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._normal_callback(1, 3, repo, pulls)

        self.assertEqual(sys.stderr.getvalue(), '')