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

  • Committer: Breezy landing bot
  • Author(s): Gustav Hartvigsson
  • Date: 2021-01-10 18:46:30 UTC
  • mfrom: (7526.1.1 brz-removed-api-doc)
  • mto: This revision was merged to the branch mainline in revision 7532.
  • Revision ID: breezy.the.bot@gmail.com-20210110184630-dxu0g9dqq020uiw6
Drop documentation for removed API API.

Merged from https://code.launchpad.net/~gustav-hartvigsson/brz/removed-api-doc/+merge/396033

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
    )
50
50
from ..transport.http import (
51
51
    response,
52
 
    HTTPConnection,
 
52
    urllib,
53
53
    )
54
54
from .file_utils import (
55
55
    FakeReadFile,
66
66
        return self.readfile
67
67
 
68
68
 
69
 
class FakeHTTPConnection(HTTPConnection):
 
69
class FakeHTTPConnection(urllib.HTTPConnection):
70
70
 
71
71
    def __init__(self, sock):
72
 
        HTTPConnection.__init__(self, 'localhost')
 
72
        urllib.HTTPConnection.__init__(self, 'localhost')
73
73
        # Set the socket to bypass the connection
74
74
        self.sock = sock
75
75
 
88
88
        f = response.ResponseFile('many', BytesIO(b'0\n1\nboo!\n'))
89
89
        self.assertEqual([b'0\n', b'1\n', b'boo!\n'], list(f))
90
90
 
 
91
    def test_readlines(self):
 
92
        f = response.ResponseFile('many', BytesIO(b'0\n1\nboo!\n'))
 
93
        self.assertEqual([b'0\n', b'1\n', b'boo!\n'], f.readlines())
 
94
 
91
95
 
92
96
class TestHTTPConnection(tests.TestCase):
93
97