Beispiel #1
0
    def test_sqlite_open(self):

        _key = kvlite.get_uuid(1)[0]
        collection = kvlite.open('sqlite://tests/db/testdb.sqlite:kvlite_test')
        collection.put(_key, 1)
        self.assertEqual(collection.count, 1)
        self.assertEqual(collection.get({'_key': _key}), (_key, 1))
        collection.delete(_key)
        self.assertEqual(collection.count, 0)
        self.assertEqual(collection.get({'_key': _key}), (None, None))
        collection.close()
Beispiel #2
0
 def test_sqlite_open(self):
     
     _key = kvlite.get_uuid(1)[0]
     collection = kvlite.open('sqlite://tests/db/testdb.sqlite:kvlite_test')
     collection.put(_key,1)
     self.assertEqual(collection.count,1)
     self.assertEqual(collection.get({'_key': _key}), (_key,1))
     collection.delete(_key)
     self.assertEqual(collection.count,0)
     self.assertEqual(collection.get({'_key': _key}), (None,None))
     collection.close()
Beispiel #3
0
    def test_get_uuid(self):

        uuids = kvlite.get_uuid(1000)
        self.assertEqual(len(set(uuids)), 1000)
Beispiel #4
0
 def test_get_uuid(self):
     
     uuids = kvlite.get_uuid(1000)
     self.assertEqual(len(set(uuids)), 1000)