From ff7069cd3cecb67c950bd125f4bf1b024ce1d3ba Mon Sep 17 00:00:00 2001 From: Aleksandar Babic Date: Thu, 4 Apr 2024 09:39:04 +0200 Subject: [PATCH] Updated test to include env var patching --- tests/test_main.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/test_main.py b/tests/test_main.py index 33f7d60..2387d02 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -4,6 +4,9 @@ @patch("logging.info") -def test_main_call_logging(mock_logging): +def test_main_call_logging(mock_logging, monkeypatch): + foo_env = "test" + monkeypatch.setenv("FOO", foo_env) + main() - mock_logging.assert_called_with("Hello World!") + mock_logging.assert_called_with(f"Hello World! foo={foo_env}")