Example #1
0
    def test_read_write(self):
        data = 'test'

        f = FileStorage(self.path)
        f.set(data)
        f.commit()

        result = f.get(len(data), 0)

        self.assertEquals(data, result)

        f.close()
Example #2
0
    def test_open_rw(self):

        f = FileStorage(self.path)
        f.close()

        self.assertEqual(True, os.path.exists(f.path))