wget/testenv/conf/environment_variables.py
Tomas Hozza 8ffebe2160 testenv: Allow definition of environment variables for wget execuion
* testenv/README: Added description for new EnvironmentVariable hook
* testenv/conf/environment_variable.py: Added implementation of
EnvironmentVariable hook
* testenv/test/base_test.py: Modified exec_wget() to enable use of
EnvironmentVariable hook

Added new test hook called EnvironmentVariables, for defining environment
variables when wget is executed in tests. This is handy for testing
environment variables, which are accepted by wget.

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2020-07-11 22:54:26 +02:00

15 lines
340 B
Python

from conf import hook
""" Test Option: EnvironmentVariables
This hook is used to define environment variables used for execution of wget
command in test."""
@hook(alias='EnvironmentVariables')
class URLs:
def __init__(self, envs):
self.envs = envs
def __call__(self, test_obj):
test_obj.envs.update(**self.envs)