/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: Canonical.com Patch Queue Manager
  • Date: 2007-04-16 18:08:53 UTC
  • mfrom: (2414.1.4 hpss-miscellany-2)
  • Revision ID: pqm@pqm.ubuntu.com-20070416180853-ucztrxo25i0fci62
(Andrew Bennetts) Rename SmartClient to _SmartClient.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1453
1453
 
1454
1454
 
1455
1455
class TestSmartClientUnicode(tests.TestCase):
1456
 
    """SmartClient tests for unicode arguments.
 
1456
    """_SmartClient tests for unicode arguments.
1457
1457
 
1458
1458
    Unicode arguments to call_with_body_bytes are not correct (remote method
1459
1459
    names, arguments, and bodies must all be expressed as byte strings), but
1460
 
    SmartClient should gracefully reject them, rather than getting into a broken
1461
 
    state that prevents future correct calls from working.  That is, it should
1462
 
    be possible to issue more requests on the medium afterwards, rather than
1463
 
    allowing one bad call to call_with_body_bytes to cause later calls to
 
1460
    _SmartClient should gracefully reject them, rather than getting into a
 
1461
    broken state that prevents future correct calls from working.  That is, it
 
1462
    should be possible to issue more requests on the medium afterwards, rather
 
1463
    than allowing one bad call to call_with_body_bytes to cause later calls to
1464
1464
    mysteriously fail with TooManyConcurrentRequests.
1465
1465
    """
1466
1466
 
1472
1472
        input = StringIO("\n")
1473
1473
        output = StringIO()
1474
1474
        client_medium = medium.SmartSimplePipesClientMedium(input, output)
1475
 
        smart_client = client.SmartClient(client_medium)
 
1475
        smart_client = client._SmartClient(client_medium)
1476
1476
        self.assertRaises(TypeError,
1477
1477
            smart_client.call_with_body_bytes, method, args, body)
1478
1478
        self.assertEqual("", output.getvalue())