~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_versionedfile.py

  • Committer: Vincent Ladeuil
  • Date: 2011-01-27 14:27:18 UTC
  • mto: (5609.10.1 2.3b5-dev)
  • mto: This revision was merged to the branch mainline in revision 5635.
  • Revision ID: v.ladeuil+lp@free.fr-20110127142718-1ik7fyjfflgj91j5
Use self.get_transport instead of transport.get_transport where possible.

Show diffs side-by-side

added added

removed removed

Lines of Context:
751
751
        self.assertEquals(('references_ghost', 'line_c\n'), origins[2])
752
752
 
753
753
    def test_readonly_mode(self):
754
 
        t = transport.get_transport(self.get_url('.'))
 
754
        t = self.get_transport()
755
755
        factory = self.get_factory()
756
756
        vf = factory('id', t, 0777, create=True, access_mode='w')
757
757
        vf = factory('id', t, access_mode='r')
782
782
class TestWeave(TestCaseWithMemoryTransport, VersionedFileTestMixIn):
783
783
 
784
784
    def get_file(self, name='foo'):
785
 
        return WeaveFile(name, transport.get_transport(self.get_url('.')),
 
785
        return WeaveFile(name, self.get_transport(),
786
786
                         create=True,
787
787
                         get_scope=self.get_transaction)
788
788
 
789
789
    def get_file_corrupted_text(self):
790
 
        w = WeaveFile('foo', transport.get_transport(self.get_url('.')),
 
790
        w = WeaveFile('foo', self.get_transport(),
791
791
                      create=True,
792
792
                      get_scope=self.get_transaction)
793
793
        w.add_lines('v1', [], ['hello\n'])
823
823
        return w
824
824
 
825
825
    def reopen_file(self, name='foo', create=False):
826
 
        return WeaveFile(name, transport.get_transport(self.get_url('.')),
 
826
        return WeaveFile(name, self.get_transport(),
827
827
                         create=create,
828
828
                         get_scope=self.get_transaction)
829
829
 
831
831
        self.assertRaises(errors.NoSuchFile,
832
832
                          WeaveFile,
833
833
                          'foo',
834
 
                          transport.get_transport(self.get_url('.')),
 
834
                          self.get_transport(),
835
835
                          get_scope=self.get_transaction)
836
836
 
837
837
    def get_factory(self):
925
925
class TestWeaveHTTP(TestCaseWithWebserver, TestReadonlyHttpMixin):
926
926
 
927
927
    def get_file(self):
928
 
        return WeaveFile('foo', transport.get_transport(self.get_url('.')),
 
928
        return WeaveFile('foo', self.get_transport(),
929
929
                         create=True,
930
930
                         get_scope=self.get_transaction)
931
931
 
1177
1177
class TestWeaveMerge(TestCaseWithMemoryTransport, MergeCasesMixin):
1178
1178
 
1179
1179
    def get_file(self, name='foo'):
1180
 
        return WeaveFile(name, transport.get_transport(self.get_url('.')),
 
1180
        return WeaveFile(name, self.get_transport(),
1181
1181
                         create=True)
1182
1182
 
1183
1183
    def log_contents(self, w):