def test_table_delete_doesnt_affect_other(self):
     store = MemoryPersist(["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', 'table1'))
예제 #2
0
 def test_table_delete_doesnt_affect_other(self):
     store = MemoryPersist(["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', 'table1'))
예제 #3
0
 def test_write_read_colq(self):
     store = MemoryPersist()
     store.write('test', value=1)
     store.write('test', 'colf', value=2)
     store.write('test', 'colf', 'colq', value=3)
     nt.assert_equal(1, store.read('test'))
     nt.assert_equal(2, store.read('test', 'colf'))
     nt.assert_equal(3, store.read('test', 'colf', 'colq'))
 def test_write_read_colq(self):
     store = MemoryPersist()
     store.write('test', value=1)
     store.write('test', 'colf', value=2)
     store.write('test', 'colf', 'colq', value=3)
     nt.assert_equal(1, store.read('test'))
     nt.assert_equal(2, store.read('test', 'colf'))
     nt.assert_equal(3, store.read('test', 'colf', 'colq'))
예제 #5
0
 def test_all(self):
     store = MemoryPersist(["default", "test2table"])
     store.write('test', value=1)
     store.write('test', 'colf', value=2)
     store.write('test', 'colf', 'colq', value=3)
     store.write('test2', table="test2table", value=1)
     store.write('test2', 'colf2', table="test2table", value=2)
     store.write('test2', 'colf2', 'colq2', table="test2table", value=3)
예제 #6
0
 def test_table_name(self):
     store = MemoryPersist("table1")
     store.write("test", "colf", "colq", "table1", 12345)
     nt.assert_equal(12345, store.read("test", "colf", "colq", "table1"))
예제 #7
0
 def test_write_read_delete(self):
     store = MemoryPersist()
     store.write('test', value=1)
     nt.assert_equal(1, store.read('test'))
     store.delete('test')
     nt.assert_raises(KeyError, store.read, ('test',))
예제 #8
0
 def test_write_read(self):
     store = MemoryPersist()
     store.write('test', value=1)
     nt.assert_equal(1, store.read('test'))
 def test_all(self):
     store = MemoryPersist(["default", "test2table"])
     store.write('test', value=1)
     store.write('test', 'colf', value=2)
     store.write('test', 'colf', 'colq', value=3)
     store.write('test2', table="test2table", value=1)
     store.write('test2', 'colf2', table="test2table", value=2)
     store.write('test2', 'colf2', 'colq2', table="test2table", value=3)
 def test_table_name(self):
     store = MemoryPersist("table1")
     store.write("test", "colf", "colq", "table1", 12345)
     nt.assert_equal(12345, store.read("test", "colf", "colq", "table1"))
 def test_write_read_delete(self):
     store = MemoryPersist()
     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(self):
     store = MemoryPersist()
     store.write('test', value=1)
     nt.assert_equal(1, store.read('test'))