1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-07-03 00:58:53 +00:00

Templar: encapsulate _available_variables (#55435)

Ensure variables are reset between iterations
This commit is contained in:
Martin Krizek 2019-05-20 17:49:54 +02:00 committed by Brian Coca
parent bd061fd632
commit 34e9d6781b
14 changed files with 47 additions and 30 deletions

View file

@ -214,7 +214,7 @@ class TestActionBase(unittest.TestCase):
self.assertEqual(env_string, "FOO=foo")
# test environment with a variable in it
templar.set_available_variables(variables=dict(the_var='bar'))
templar.available_variables = dict(the_var='bar')
mock_task.environment = [dict(FOO='{{the_var}}')]
env_string = action_base._compute_environment_string()
self.assertEqual(env_string, "FOO=bar")