~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_repository/test_repository.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:
52
52
    )
53
53
from bzrlib.tests.per_repository import TestCaseWithRepository
54
54
from bzrlib.transport import get_transport
 
55
from bzrlib.transport.fakevfat import FakeVFATServer
55
56
from bzrlib.upgrade import upgrade
56
57
from bzrlib.workingtree import WorkingTree
57
58
 
1295
1296
        from bzrlib.remote import RemoteRepositoryFormat
1296
1297
        if isinstance(self.repository_format, RemoteRepositoryFormat):
1297
1298
            return
 
1299
        self.transport_server = FakeVFATServer
1298
1300
        FOO_ID = 'foo<:>ID'
1299
1301
        REV_ID = 'revid-1'
1300
1302
        # this makes a default format repository always, which is wrong:
1306
1308
        wt.add(['foo'], [FOO_ID])
1307
1309
        wt.commit('this is my new commit', rev_id=REV_ID)
1308
1310
        # now access over vfat; should be safe
1309
 
        branch = bzrdir.BzrDir.open('vfat+' + self.get_url('repo')).open_branch()
 
1311
        branch = bzrdir.BzrDir.open(self.get_url('repo')).open_branch()
1310
1312
        revtree = branch.repository.revision_tree(REV_ID)
1311
1313
        revtree.lock_read()
1312
1314
        self.addCleanup(revtree.unlock)