diff --git a/tests/test_load.py b/tests/test_load.py index b39f673..444db17 100644 --- a/tests/test_load.py +++ b/tests/test_load.py @@ -98,7 +98,12 @@ def populate(dest_dir, rougailconfig): root_config = config.unrestraint else: root_config = config.unrestraint.value.mandatory() - values = ['ROUGAIL_' + variable.path().upper() + '="' + "" if get_value(variable) is None else get_value(variable) + '"' for variable in get_variables(root_config)] + values = [] + for variable in get_variables(root_config): + var = get_value(variable) + if var is None: + var = "" + values.append('ROUGAIL_' + variable.path().upper() + '="' + var + '"') if not environment_file.is_file(): with environment_file.open('w') as envfh: envfh.write('\n'.join(values) + '\n')