def setUp(self): Connection(TEST_DB_URI).drop_database('serial_test_db') SerializableMongoWrapper.configureConnection(TEST_DB_URI) SerializableDBWrapper.setWrapperFactory(makeMongo) #Pre-created wrapper for direct use self.wrapper = makeMongo()
def tearDown(self): SerializableDBWrapper.setWrapperFactory(None) SerializableMongoWrapper.configureConnection(None) _flushLazyWrappers()
def setUp(self): Connection(TEST_DB_URI).drop_database('auth_test_db') SerializableMongoWrapper.configureConnection(TEST_DB_URI) SerializableDBWrapper.setWrapperFactory(makeMongo)
def makeMongo(collection=None): if collection: return SerializableMongoWrapper(collection) else: return SerializableMongoWrapper()