mirror of
https://github.com/mirror/wget.git
synced 2024-12-28 05:40:08 +08:00
8ffebe2160
* 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>
15 lines
340 B
Python
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)
|