diff --git a/tests/test_plugin/test_plugin.py b/tests/test_plugin/test_plugin.py index 9cb19be..3033d2d 100644 --- a/tests/test_plugin/test_plugin.py +++ b/tests/test_plugin/test_plugin.py @@ -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")