~mandel/ubuntuone-client/fix-file-shelf-windows

« back to all changes in this revision

Viewing changes to tests/syncdaemon/test_fileshelf.py

  • Committer: Manuel de la Pena
  • Date: 2011-08-05 10:59:09 UTC
  • Revision ID: mandel@themacaque.com-20110805105909-armrdq2u8amdvvj4
Use open_file instead of open in the tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
from twisted.internet import defer
27
27
 
28
28
from ubuntuone.devtools.testcase import skipIfOS
29
 
from ubuntuone.platform import path_exists
 
29
from ubuntuone.platform import path_exists, open_file
30
30
from ubuntuone.syncdaemon.file_shelf import (
31
31
    FileShelf,
32
32
    CachedFileShelf,
205
205
        path = self.shelf.key_file('foo')
206
206
        open(self.shelf.key_file('foo'), 'w').close()
207
207
        for _ in xrange(20):
208
 
            open(path+'.old', 'w').close()
 
208
            open_file(path+'.old', 'w').close()
209
209
            path=path+'.old'
210
210
        self.assertRaises(KeyError, self.shelf.__getitem__, 'foo')
211
211