/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-03-18 05:17:33 UTC
  • mto: This revision was merged to the branch mainline in revision 4194.
  • Revision ID: andrew.bennetts@canonical.com-20090318051733-l5rxgj31et1dkm6s
Use BzrDir pre_open hook to jail request code from accessing transports other than the backing transport.

Show diffs side-by-side

added added

removed removed

Lines of Context:
398
398
        Branch.hooks.install_named_hook('open', opened_branches.append, None)
399
399
        backing = self.get_transport()
400
400
        request = smart.bzrdir.SmartServerRequestOpenBranchV2(backing)
401
 
        response = request.execute('feature')
 
401
        request.setup_jail()
 
402
        try:
 
403
            response = request.execute('feature')
 
404
        finally:
 
405
            request.teardown_jail()
402
406
        expected_format = feature._format.network_name()
403
407
        self.assertEqual(
404
408
            SuccessfulSmartServerResponse(('branch', expected_format)),