Example #1
0
 def test_prefered_uid(self):
     uid = "1"
     real_uid = dbk.write(Test.SHORT_WRITE, preferred_uid=uid)
     assert uid == real_uid
     ret = dbk.read(uid)
     assert ret == Test.SHORT_WRITE
Example #2
0
 def test_uid_clash(self):
     uid = "1"
     real_uid1 = dbk.write(Test.SHORT_WRITE, preferred_uid=uid)
     real_uid2 = dbk.write(Test.SHORT_WRITE, preferred_uid=uid)
     assert real_uid1 != real_uid2
Example #3
0
 def test_write_n_retrieve(self):
     dbk.init()
     uid = dbk.write(Test.SHORT_WRITE)
     ret = dbk.read(uid)
     assert ret == Test.SHORT_WRITE