added global site variables to environment

This commit is contained in:
Bastian Venthur
2021-03-08 21:35:51 +01:00
parent 3874d19371
commit d778d01e78
5 changed files with 57 additions and 13 deletions

View File

@@ -99,3 +99,13 @@ author = a. u. thor
config_parsed = blag.get_config(configfile)
assert config_parsed['base_url'] == 'https://example.com/'
def test_environment_factory():
globals_ = {
'foo': 'bar',
'test': 'me'
}
env = blag.environment_factory(globals_=globals_)
assert env.globals['foo'] == 'bar'
assert env.globals['test'] == 'me'