Skip to content

Commit 21bf92e

Browse files
authored
Fix test for PR theskumar#245
1 parent f97324c commit 21bf92e

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎tests/test_main.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,11 @@ def test_get_key_no_file(tmp_path):
7474
nx_file = str(tmp_path / "nx")
7575
logger = logging.getLogger("dotenv.main")
7676

77-
with mock.patch.object(logger, "warning") as mock_warning:
77+
with mock.patch.object(logger, "info") as mock_info:
7878
result = dotenv.get_key(nx_file, "foo")
7979

8080
assert result is None
81-
mock_warning.assert_has_calls(
81+
mock_info.assert_has_calls(
8282
calls=[
8383
mock.call("[python-dotenv] Configuration file %s doesn't exist.", nx_file),
8484
mock.call("Key %s not found in %s.", "foo", nx_file),
@@ -228,10 +228,10 @@ def test_load_dotenv_existing_file(dotenv_file):
228228
def test_load_dotenv_no_file_verbose():
229229
logger = logging.getLogger("dotenv.main")
230230

231-
with mock.patch.object(logger, "warning") as mock_warning:
231+
with mock.patch.object(logger, "info") as mock_info:
232232
dotenv.load_dotenv('.does_not_exist', verbose=True)
233233

234-
mock_warning.assert_called_once_with("[python-dotenv] Configuration file %s doesn't exist.", ".does_not_exist")
234+
mock_info.assert_called_once_with("[python-dotenv] Configuration file %s doesn't exist.", ".does_not_exist")
235235

236236

237237
@mock.patch.dict(os.environ, {"a": "c"}, clear=True)

0 commit comments

Comments
 (0)