/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

Support user.signingkey configuration variable in .git/config.

Merged from https://code.launchpad.net/~jelmer/brz/local-git-key/+merge/381000

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