def test_manager_in_memory(self):

        URI = 'sqlite://memory'
        collection = 'kvlite_test'
        
        manager = SqliteCollectionManager(URI)

        if collection in manager.collections():
            manager.remove(collection)
            
        self.assertNotIn(collection, manager.collections())

        manager.create(collection)
        self.assertIn(collection, manager.collections())

        manager.remove(collection)
        self.assertNotIn(collection, manager.collections())

        manager.close()
Exemple #2
0
    def test_manager_in_memory(self):

        URI = 'sqlite://memory'
        collection = 'kvlite_test'

        manager = SqliteCollectionManager(URI)

        if collection in manager.collections():
            manager.remove(collection)

        self.assertNotIn(collection, manager.collections())

        manager.create(collection)
        self.assertIn(collection, manager.collections())

        manager.remove(collection)
        self.assertNotIn(collection, manager.collections())

        manager.close()