~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_remote.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-05-07 13:42:18 UTC
  • mfrom: (2471.2.1 hpss-0.11-compat)
  • Revision ID: pqm@pqm.ubuntu.com-20070507134218-nk6vem1ok21xv3yt
(robertc) Fix trivial incompatibility with bzr 0.11 servers, which give a slightly different error to bzr 0.15 servers. (Andrew Bennetts)

Show diffs side-by-side

added added

removed removed

Lines of Context:
422
422
            [('call', 'Transport.is_readonly', ())],
423
423
            client._calls)
424
424
 
 
425
    def test_error_from_old_0_11_server(self):
 
426
        """Same as test_error_from_old_server, but with the slightly different
 
427
        error message from bzr 0.11 servers.
 
428
        """
 
429
        client = FakeClient([(
 
430
            ('error', "Generic bzr smart protocol error: "
 
431
                      "bad request u'Transport.is_readonly'"), '')])
 
432
        transport = RemoteTransport('bzr://example.com/', medium=False,
 
433
                                    _client=client)
 
434
        self.assertEqual(False, transport.is_readonly())
 
435
        self.assertEqual(
 
436
            [('call', 'Transport.is_readonly', ())],
 
437
            client._calls)
 
438
 
425
439
 
426
440
class TestRemoteRepository(tests.TestCase):
427
441
    """Base for testing RemoteRepository protocol usage.