diff --git a/tests/envvars/00_6string/env b/tests/envvars/00_6string/env deleted file mode 100644 index ea046c3..0000000 --- a/tests/envvars/00_6string/env +++ /dev/null @@ -1,8 +0,0 @@ -ROUGAIL_VAR1="spam" -ROUGAIL_VAR2="egg" -ROUGAIL_VAR3="hugh" -ROUGAIL_VAR4="some" -ROUGAIL_VAR5="part" -ROUGAIL_VAR6="ming" -ROUGAIL_IDONTEXIST="blah" -ROUGAIL_IDONTEXIST2="hum" diff --git a/tests/envvars/00_6string/env/all.env b/tests/envvars/00_6string/env/all.env new file mode 100644 index 0000000..f3cdd33 --- /dev/null +++ b/tests/envvars/00_6string/env/all.env @@ -0,0 +1,6 @@ +ROUGAIL_VAR1="string1" +ROUGAIL_VAR2="string1" +ROUGAIL_VAR3="string1" +ROUGAIL_VAR4="string1" +ROUGAIL_VAR5="string1" +ROUGAIL_VAR6="string1" diff --git a/tests/envvars/00_6string/env/mandatories.env b/tests/envvars/00_6string/env/mandatories.env new file mode 100644 index 0000000..000c6a3 --- /dev/null +++ b/tests/envvars/00_6string/env/mandatories.env @@ -0,0 +1,3 @@ +ROUGAIL_VAR1="string1" +ROUGAIL_VAR2="string1" +ROUGAIL_VAR3="string1" diff --git a/tests/makedict/00_6string/output.json b/tests/makedict/00_6string/output.json index 4771a46..a97f88d 100644 --- a/tests/makedict/00_6string/output.json +++ b/tests/makedict/00_6string/output.json @@ -1,8 +1,8 @@ { - "rougail.var1": "spam", - "rougail.var2": "egg", - "rougail.var3": "hugh", - "rougail.var4": "some", - "rougail.var5": "part", - "rougail.var6": "ming" + "rougail.var1": "string1", + "rougail.var2": "string1", + "rougail.var3": "string1", + "rougail.var4": "string1", + "rougail.var5": "string1", + "rougail.var6": "string1" } diff --git a/tests/test_load.py b/tests/test_load.py index aad95b1..5add669 100644 --- a/tests/test_load.py +++ b/tests/test_load.py @@ -3,7 +3,7 @@ from .custom import CustomOption from pathlib import Path import os import json - + from pytest import fixture from ruamel.yaml import YAML from dotenv import load_dotenv @@ -46,7 +46,7 @@ def test_dictionaries_warning(test_dir): 'warnings': [], } # loading the env file - envfile = dest_dir / 'env' + envfile = dest_dir / 'env'/ 'all.env' load_dotenv(envfile) # loads the environment variables in the tiramisu config environment = RougailUserDataEnvironment(config, @@ -68,7 +68,7 @@ def populate(dest_dir, rougailconfig): for level in ['all', 'mandatories']: environment_file = dest_dir / 'env' / f'{level}.env' makedict_file = dest_dir / 'makedict' / f'{level}.env' - if not environment_file.is_file() or not makedict.is_file(): + if not environment_file.is_file() or not makedict_file.is_file(): config = Rougail(rougailconfig).run() if level == 'all': root_config = config.unrestraint @@ -78,7 +78,7 @@ def populate(dest_dir, rougailconfig): if not environment_file.is_file(): with environment_file.open('w') as envfh: envfh.write('\n'.join(values) + '\n') - if not makedict.is_file(): + if not makedict_file.is_file(): with environment_file.open('w') as envfh: envfh.write('\n'.join(values) + '\n')