/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-06-11 01:25:02 UTC
  • mfrom: (7490.40.10 work)
  • mto: This revision was merged to the branch mainline in revision 7511.
  • Revision ID: jelmer@jelmer.uk-20200611012502-z6hno3todj3cycgv
Mere lp:brz/3.1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
149
149
    def setUp(self):
150
150
        super(ParseHangupTests, self).setUp()
151
151
        try:
152
 
            HangupException(['foo'])
 
152
            HangupException([b'foo'])
153
153
        except TypeError:
154
154
            self.skipTest('dulwich version too old')
155
155
 
160
160
    def test_single_line(self):
161
161
        self.assertEqual(
162
162
            RemoteGitError('foo bar'),
163
 
            parse_git_hangup('http://', HangupException(['foo bar'])))
 
163
            parse_git_hangup('http://', HangupException([b'foo bar'])))
164
164
 
165
165
    def test_multi_lines(self):
166
166
        self.assertEqual(
167
167
            RemoteGitError('foo bar\nbla bla'),
168
168
            parse_git_hangup(
169
 
                'http://', HangupException(['foo bar', 'bla bla'])))
 
169
                'http://', HangupException([b'foo bar', b'bla bla'])))
170
170
 
171
171
    def test_filter_boring(self):
172
172
        self.assertEqual(
173
173
            RemoteGitError('foo bar'), parse_git_hangup('http://', HangupException(
174
 
                ['=======', 'foo bar', '======'])))
 
174
                [b'=======', b'foo bar', b'======'])))
175
175
 
176
176
    def test_permission_denied(self):
177
177
        self.assertEqual(
179
179
            parse_git_hangup(
180
180
                'http://',
181
181
                HangupException(
182
 
                    ['=======',
183
 
                     'You are not allowed to push code to this project.', '', '======'])))
 
182
                    [b'=======',
 
183
                     b'You are not allowed to push code to this project.', b'', b'======'])))
184
184
 
185
185
 
186
186
class TestRemoteGitBranchFormat(TestCase):