/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-07-05 12:50:01 UTC
  • mfrom: (7490.40.46 work)
  • mto: (7490.40.48 work)
  • mto: This revision was merged to the branch mainline in revision 7519.
  • Revision ID: jelmer@jelmer.uk-20200705125001-7s3vo0p55szbbws7
Merge lp:brz/3.1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
"""Test the smart client."""
18
18
 
 
19
from __future__ import absolute_import
 
20
 
19
21
from io import BytesIO
20
22
 
21
23
import os
135
137
        self.assertEqual(e.path, 'porridge/gaduhistory.git')
136
138
        self.assertEqual(e.extra, ': denied to jelmer')
137
139
 
138
 
    def test_pre_receive_hook_declined(self):
139
 
        e = parse_git_error(
140
 
            "url",
141
 
            'pre-receive hook declined')
142
 
        self.assertIsInstance(e, PermissionDenied)
143
 
        self.assertEqual(e.path, "url")
144
 
        self.assertEqual(e.extra, ': pre-receive hook declined')
145
 
 
146
140
    def test_invalid_repo_name(self):
147
141
        e = parse_git_error(
148
142
            "url",
151
145
""")
152
146
        self.assertIsInstance(e, NotBranchError)
153
147
 
154
 
    def test_invalid_git_error(self):
155
 
        self.assertEqual(
156
 
            PermissionDenied(
157
 
                'url',
158
 
                'GitLab: You are not allowed to push code to protected '
159
 
                'branches on this project.'),
160
 
            parse_git_error(
161
 
                'url',
162
 
                RemoteGitError(
163
 
                    'GitLab: You are not allowed to push code to '
164
 
                    'protected branches on this project.')))
165
 
 
166
148
 
167
149
class ParseHangupTests(TestCase):
168
150