def test_user_configuration_overrides_system_configuration(): settings = {'database': 'foobar'} target.makedir() with config.open('a') as outf: dump_settings(settings, outf) merged = load_configuration(target) assert merged['database'] == 'foobar' assert merged['encoding'] == 'utf-8'
def wrapper(options): config = configuration.load_configuration(options.home) db = configuration.get_db(config) out = command(config, options, data.Data(db)) db.commit() return out