~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_remote.py

  • Committer: Andrew Bennetts
  • Date: 2007-04-30 06:42:24 UTC
  • mto: (2477.1.13 0.16-release)
  • mto: This revision was merged to the branch mainline in revision 2482.
  • Revision ID: andrew.bennetts@canonical.com-20070430064224-hagj8m0855p1sxn7
Fix trivial incompatibility with bzr 0.11 servers, which give a slightly different error to bzr 0.15 servers.

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.