/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_smart_transport.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2020-02-14 03:16:54 UTC
  • mfrom: (7479.2.3 no-more-python2)
  • Revision ID: breezy.the.bot@gmail.com-20200214031654-bp1xtv2jr9nmhto3
Drop python2 support.

Merged from https://code.launchpad.net/~jelmer/brz/no-more-python2/+merge/378694

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
# all of this deals with byte strings so this is safe
20
20
import doctest
21
21
import errno
 
22
from io import BytesIO
22
23
import os
23
24
import socket
24
25
import subprocess
55
56
    test_smart,
56
57
    test_server,
57
58
    )
58
 
from ..sixish import (
59
 
    BytesIO,
60
 
    int2byte,
61
 
    )
62
59
from ..transport import (
63
60
    http,
64
61
    local,
3169
3166
        decoder, response_handler = self.make_logging_response_decoder()
3170
3167
        for byte in bytearray(simple_response):
3171
3168
            self.assertNotEqual(0, decoder.next_read_size())
3172
 
            decoder.accept_bytes(int2byte(byte))
 
3169
            decoder.accept_bytes(bytes([byte]))
3173
3170
        # Now the response is complete
3174
3171
        self.assertEqual(0, decoder.next_read_size())
3175
3172