def drop_database(): """ Drop the test database created """ db().exp_drop(DB_NAME)
CONTEXT = {} DEMO = False def change_addons_path(new_path): """ Change the default addons-path """ from openerp.tools import config config['addons_path'] = new_path def set_demo(demo=False): DEMO = demo # Create a database with the name DB = db().exp_create_database( DB_NAME, demo=DEMO, lang=None, user_password=USER_PASSWORD ) class Pool(object): """ A proxy object to the current database pool """ def __getattr__(self, name): """ Just act as a proxy for all attributes """ return getattr(RegistryManager.get(DB_NAME), name) POOL = Pool()