def setup_module(module): # This is though to test since the testing process has likely already # setup a configuration, db connection etc. We try to remember it, and # reset state on module teardown. module.old_config = conf.config._target conf.config.reset() from feedplatform import db db.reconfigure()
def teardown_module(module): conf.config._target = module.old_config from feedplatform import db db.reconfigure()