/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/git/tests/test_remote.py

  • Committer: Jelmer Vernooij
  • Date: 2020-08-05 20:34:11 UTC
  • mfrom: (7490.40.87 work)
  • mto: (7490.40.103 work)
  • mto: This revision was merged to the branch mainline in revision 7521.
  • Revision ID: jelmer@jelmer.uk-20200805203411-cap9gp8vuwnz5lt7
Merge lp:brz/3.1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
137
137
        self.assertEqual(e.path, 'porridge/gaduhistory.git')
138
138
        self.assertEqual(e.extra, ': denied to jelmer')
139
139
 
 
140
    def test_pre_receive_hook_declined(self):
 
141
        e = parse_git_error(
 
142
            "url",
 
143
            'pre-receive hook declined')
 
144
        self.assertIsInstance(e, PermissionDenied)
 
145
        self.assertEqual(e.path, "url")
 
146
        self.assertEqual(e.extra, ': pre-receive hook declined')
 
147
 
140
148
    def test_invalid_repo_name(self):
141
149
        e = parse_git_error(
142
150
            "url",
145
153
""")
146
154
        self.assertIsInstance(e, NotBranchError)
147
155
 
 
156
    def test_invalid_git_error(self):
 
157
        self.assertEqual(
 
158
            PermissionDenied(
 
159
                'url',
 
160
                'GitLab: You are not allowed to push code to protected '
 
161
                'branches on this project.'),
 
162
            parse_git_error(
 
163
                'url',
 
164
                RemoteGitError(
 
165
                    'GitLab: You are not allowed to push code to '
 
166
                    'protected branches on this project.')))
 
167
 
148
168
 
149
169
class ParseHangupTests(TestCase):
150
170