~divmod-dev/divmod.org/dangling-1091

« back to all changes in this revision

Viewing changes to Axiom/axiom/test/test_files.py

  • Committer: glyph
  • Date: 2005-07-28 22:09:16 UTC
  • Revision ID: svn-v4:866e43f7-fbfc-0310-8f2a-ec88d1da2979:trunk:2
move this repository to a more official-looking URL

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
from twisted.trial import unittest
 
3
 
 
4
from axiom.store import Store
 
5
 
 
6
class InStoreFilesTest(unittest.TestCase):
 
7
 
 
8
    def testCreateFile(self):
 
9
        s = Store(self.mktemp())
 
10
        f = s.newFile('test', 'whatever.txt')
 
11
        f.write('crap')
 
12
        def cb(fpath):
 
13
            self.assertEquals(fpath.open().read(), 'crap')
 
14
 
 
15
        return f.close().addCallback(cb)