Ejemplo n.º 1
0
 def test_table_delete_doesnt_affect_other(self):
     store = FilePersist("tmp", ["table1", "table2"])
     store.write("test", "colf", "colq", "table1", '12345')
     store.write("test", "colf", "colq", "table2", '12345')
     store.delete("test", "table1")
     nt.assert_equal('12345', store.read("test", "colf", "colq", "table2"))
     nt.assert_raises(KeyError, store.read, 'test', table='table1')
 def test_table_delete_doesnt_affect_other(self):
     store = FilePersist("tmp", ["table1", "table2"])
     store.write("test", "colf", "colq", "table1", '12345')
     store.write("test", "colf", "colq", "table2", '12345')
     store.delete("test", "table1")
     nt.assert_equal('12345', store.read("test", "colf", "colq", "table2"))
     nt.assert_raises(KeyError, store.read, 'test', table='table1')
Ejemplo n.º 3
0
 def test_write_read_delete(self):
     store = FilePersist("tmp")
     store.write('test', value='1')
     nt.assert_equal('1', store.read('test'))
     store.delete('test')
     nt.assert_raises(KeyError, store.read, 'test')
 def test_write_read_delete(self):
     store = FilePersist("tmp")
     store.write('test', value='1')
     nt.assert_equal('1', store.read('test'))
     store.delete('test')
     nt.assert_raises(KeyError, store.read, 'test')