/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/tests/test_remote.py

  • Committer: Jelmer Vernooij
  • Date: 2020-02-07 02:14:30 UTC
  • mto: This revision was merged to the branch mainline in revision 7492.
  • Revision ID: jelmer@jelmer.uk-20200207021430-m49iq3x4x8xlib6x
Drop python2 support.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
 
26
26
import base64
27
27
import bz2
 
28
from io import BytesIO
28
29
import tarfile
29
30
import zlib
30
31
 
69
70
    NULL_REVISION,
70
71
    Revision,
71
72
    )
72
 
from ..sixish import (
73
 
    BytesIO,
74
 
    PY3,
75
 
    text_type,
76
 
    )
77
73
from ..bzr.smart import medium, request
78
74
from ..bzr.smart.client import _SmartClient
79
75
from ..bzr.smart.repository import (
339
335
        client.add_success_response(b'yes',)
340
336
        transport = RemoteTransport('bzr://localhost/', _client=client)
341
337
        filename = u'/hell\u00d8'
342
 
        if PY3:
343
 
            result = transport.has(filename)
344
 
        else:
345
 
            result = transport.has(filename.encode('utf-8'))
 
338
        result = transport.has(filename)
346
339
        self.assertEqual(
347
340
            [('call', b'has', (filename.encode('utf-8'),))],
348
341
            client._calls)
1787
1780
            branch._set_last_revision, b'rev-id')
1788
1781
        # The UTF-8 message from the response has been decoded into a unicode
1789
1782
        # object.
1790
 
        self.assertIsInstance(err.msg, text_type)
 
1783
        self.assertIsInstance(err.msg, str)
1791
1784
        self.assertEqual(rejection_msg_unicode, err.msg)
1792
1785
        branch.unlock()
1793
1786
        self.assertFinished(client)