/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: Robert Collins
  • Date: 2009-09-17 11:54:41 UTC
  • mto: This revision was merged to the branch mainline in revision 4700.
  • Revision ID: robertc@robertcollins.net-20090917115441-2ug57z6eyrnb6zim
Add stronger test isolation by interception BzrDir.open and checking the thing being opened is known to the test suite.

Show diffs side-by-side

added added

removed removed

Lines of Context:
993
993
 
994
994
        :param readonly: Create a readonly server.
995
995
        """
 
996
        # NB: Tests using this fall into two categories: tests of the server,
 
997
        # tests wanting a server. The latter should be updated to use
 
998
        # self.vfs_transport_factory etc.
996
999
        if not backing_transport:
997
1000
            self.backing_transport = memory.MemoryTransport()
998
1001
        else:
1004
1007
        self.server.start_background_thread('-' + self.id())
1005
1008
        self.transport = remote.RemoteTCPTransport(self.server.get_url())
1006
1009
        self.addCleanup(self.tearDownServer)
 
1010
        self.permit_url(self.server.get_url())
1007
1011
 
1008
1012
    def tearDownServer(self):
1009
1013
        if getattr(self, 'transport', None):