automatic tests passing
This commit is contained in:
parent
76a4f18bec
commit
040fc2396c
5 changed files with 19 additions and 18 deletions
|
@ -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"
|
6
tests/envvars/00_6string/env/all.env
vendored
Normal file
6
tests/envvars/00_6string/env/all.env
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
ROUGAIL_VAR1="string1"
|
||||
ROUGAIL_VAR2="string1"
|
||||
ROUGAIL_VAR3="string1"
|
||||
ROUGAIL_VAR4="string1"
|
||||
ROUGAIL_VAR5="string1"
|
||||
ROUGAIL_VAR6="string1"
|
3
tests/envvars/00_6string/env/mandatories.env
vendored
Normal file
3
tests/envvars/00_6string/env/mandatories.env
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
ROUGAIL_VAR1="string1"
|
||||
ROUGAIL_VAR2="string1"
|
||||
ROUGAIL_VAR3="string1"
|
|
@ -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"
|
||||
}
|
||||
|
|
|
@ -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')
|
||||
|
||||
|
|
Loading…
Reference in a new issue