mirror of
https://github.com/bendtherules/pytest_gui_status.git
synced 2026-08-18 13:42:26 +00:00
Add env config test
This commit is contained in:
@@ -107,3 +107,20 @@ def test_intermediate_1(tmpdir):
|
||||
pytest_ret_code = popen_pytest.wait()
|
||||
|
||||
assert pytest_ret_code == 0
|
||||
|
||||
|
||||
@patch.dict("os.environ",
|
||||
{"REDIS_PATH": "test_redis",
|
||||
"REDIS_ARGS": "--test_arg = test_val",
|
||||
"REDIS_PORT": "1234"})
|
||||
def test_env_redis_1(monkeypatch):
|
||||
# REDIS_PATH
|
||||
# REDIS_ARGS
|
||||
# REDIS_PORT
|
||||
# del status_plugin
|
||||
monkeypatch.setenv("REDIS_PATH", "test")
|
||||
print("recalc")
|
||||
status_plugin.calc_globals()
|
||||
|
||||
redis_cmd_final = status_plugin.command_redis_server
|
||||
assert(redis_cmd_final == "test_redis --port 1234 --test_arg=test_val")
|
||||
|
||||
Reference in New Issue
Block a user