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

  • Committer: Andrew Bennetts
  • Date: 2009-09-22 00:34:10 UTC
  • mto: This revision was merged to the branch mainline in revision 4713.
  • Revision ID: andrew.bennetts@canonical.com-20090922003410-ji9dq3vk3ld5vhkf
Give 'no' response for paths outside the root_client_path.

Show diffs side-by-side

added added

removed removed

Lines of Context:
460
460
        self.assertEqual(SmartServerResponse(('yes', 'no')),
461
461
            request.execute(''))
462
462
 
463
 
    def test_illegal_path(self):
464
 
        # Well-behaved clients should never try this, so it's okay for it to
465
 
        # raise an exception rather than a tidy error.
 
463
    def test_outside_root_client_path(self):
466
464
        backing = self.get_transport()
467
465
        request = smart.bzrdir.SmartServerRequestOpenBzrDir_2_1(backing,
468
466
            root_client_path='root')
469
 
        self.assertRaises(errors.PathNotChild, request.execute, 'not-root')
 
467
        self.assertEqual(SmartServerResponse(('no',)),
 
468
            request.execute('not-root'))
470
469
 
471
470
    
472
471
class TestSmartServerRequestOpenBzrDir_2_1_disk(TestCaseWithChrootedTransport):