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

Function test_get_key_ok

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

Source from the content-addressed store, hash-verified

105
106
107def test_get_key_ok(dotenv_file):
108 logger = logging.getLogger("dotenv.main")
109 with open(dotenv_file, "w") as f:
110 f.write("foo=bar")
111
112 with mock.patch.object(logger, "warning") as mock_warning:
113 result = dotenv.get_key(dotenv_file, "foo")
114
115 assert result == "bar"
116 mock_warning.assert_not_called()
117
118
119def test_get_key_encoding(dotenv_file):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected