MCPcopy Create free account
hub / github.com/theskumar/python-dotenv / test_get_key_not_found

Function test_get_key_not_found

tests/test_main.py:97–104  ·  view source on GitHub ↗
(dotenv_file)

Source from the content-addressed store, hash-verified

95
96
97def test_get_key_not_found(dotenv_file):
98 logger = logging.getLogger("dotenv.main")
99
100 with mock.patch.object(logger, "warning") as mock_warning:
101 result = dotenv.get_key(dotenv_file, "foo")
102
103 assert result is None
104 mock_warning.assert_called_once_with("Key %s not found in %s.", "foo", dotenv_file)
105
106
107def test_get_key_ok(dotenv_file):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected