~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/transport_util.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-09-18 02:51:19 UTC
  • mfrom: (4691.2.5 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20090918025119-eqkrmtj09t2hqs2t
(robertc) Add test suite enforcement of BzrDir objects outside the
        test area. (Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
 
34
34
from bzrlib.transport import (
35
35
    ConnectedTransport,
 
36
    get_transport,
36
37
    register_transport,
37
38
    register_urlparse_netloc_protocol,
38
39
    unregister_transport,
106
107
        self.addCleanup(unregister)
107
108
        super(TestCaseWithConnectionHookedTransport, self).setUp()
108
109
        self.reset_connections()
 
110
        # Add the 'hooked' url to the permitted url list.
 
111
        # XXX: See TestCase.start_server. This whole module shouldn't need to
 
112
        # exist - a bug has been filed on that. once its cleanedup/removed, the
 
113
        # standard test support code will work and permit the server url
 
114
        # correctly.
 
115
        url = self.get_url()
 
116
        t = get_transport(url)
 
117
        if t.base.endswith('work/'):
 
118
            t = t.clone('../..')
 
119
        self.permit_url(t.base)
109
120
 
110
121
    def get_url(self, relpath=None):
111
122
        super_self = super(TestCaseWithConnectionHookedTransport, self)