def test_manager_get_collection(self):

        URI = 'mysql://*****:*****@localhost/kvlite_test'
        collection = 'kvlite_test'

        manager = MysqlCollectionManager(URI)
        self.assertEqual(manager.collection_class.__name__, 'MysqlCollection')
    def test_incorrect_uri_wrong_collection_in_remove(self):

        URI = 'mysql://*****:*****@localhost/kvlite_test'
        collection_name = 'unknown_collection'

        manager = MysqlCollectionManager(URI)
        self.assertRaises(RuntimeError, manager.remove, (collection_name))
    def test_manager(self):
        
        URI = 'mysql://*****:*****@localhost/kvlite_test'
        collection = 'kvlite_test'
        
        manager = MysqlCollectionManager(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()