/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_sftp_transport.py

  • Committer: Vincent Ladeuil
  • Date: 2011-07-06 09:22:00 UTC
  • mfrom: (6008 +trunk)
  • mto: (6012.1.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 6013.
  • Revision ID: v.ladeuil+lp@free.fr-20110706092200-7iai2mwzc0sqdsvf
MergingĀ inĀ trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
189
189
class SFTPBranchTest(TestCaseWithSFTPServer):
190
190
    """Test some stuff when accessing a bzr Branch over sftp"""
191
191
 
192
 
    def test_lock_file(self):
193
 
        # old format branches use a special lock file on sftp.
194
 
        b = self.make_branch('', format=bzrdir.BzrDirFormat6())
195
 
        b = bzrlib.branch.Branch.open(self.get_url())
196
 
        self.assertPathExists('.bzr/')
197
 
        self.assertPathExists('.bzr/branch-format')
198
 
        self.assertPathExists('.bzr/branch-lock')
199
 
 
200
 
        self.assertPathDoesNotExist('.bzr/branch-lock.write-lock')
201
 
        b.lock_write()
202
 
        self.assertPathExists('.bzr/branch-lock.write-lock')
203
 
        b.unlock()
204
 
        self.assertPathDoesNotExist('.bzr/branch-lock.write-lock')
205
 
 
206
192
    def test_push_support(self):
207
193
        self.build_tree(['a/', 'a/foo'])
208
194
        t = bzrdir.BzrDir.create_standalone_workingtree('a')
431
417
 
432
418
 
433
419
class ReadvFile(object):
434
 
    """An object that acts like Paramiko's SFTPFile.readv()"""
 
420
    """An object that acts like Paramiko's SFTPFile when readv() is used"""
435
421
 
436
422
    def __init__(self, data):
437
423
        self._data = data
440
426
        for start, length in requests:
441
427
            yield self._data[start:start+length]
442
428
 
 
429
    def close(self):
 
430
        pass
 
431
 
443
432
 
444
433
def _null_report_activity(*a, **k):
445
434
    pass