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

  • Committer: Andrew Bennetts
  • Date: 2007-10-26 01:09:10 UTC
  • mfrom: (2944 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2945.
  • Revision ID: andrew.bennetts@canonical.com-20071026010910-5ibwby7sfga11llr
Merge from bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1424
1424
        self.assertOffsetSerialisation([(1,2), (3,4), (100, 200)],
1425
1425
            '1,2\n3,4\n100,200', self.client_protocol)
1426
1426
 
 
1427
    def test_connection_closed_reporting(self):
 
1428
        input = StringIO()
 
1429
        output = StringIO()
 
1430
        client_medium = medium.SmartSimplePipesClientMedium(input, output)
 
1431
        request = client_medium.get_request()
 
1432
        smart_protocol = protocol.SmartClientRequestProtocolOne(request)
 
1433
        smart_protocol.call('hello')
 
1434
        ex = self.assertRaises(errors.ConnectionReset, 
 
1435
            smart_protocol.read_response_tuple)
 
1436
        self.assertEqual("Connection closed: "
 
1437
            "please check connectivity and permissions "
 
1438
            "(and try -Dhpss if further diagnosis is required)", str(ex))
 
1439
 
1427
1440
    def test_accept_bytes_of_bad_request_to_protocol(self):
1428
1441
        out_stream = StringIO()
1429
1442
        smart_protocol = protocol.SmartServerRequestProtocolOne(