Skip to content

Commit

Permalink
Updated test to include env var patching
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksandar-babic committed Apr 4, 2024
1 parent 5c90782 commit ff7069c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}")

0 comments on commit ff7069c

Please sign in to comment.