Skip to content

Commit 3a6f809

Browse files
committed
fix tests
1 parent efcbfac commit 3a6f809

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tests/unit_tests/cli/test_configure.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ def test_save_configuration_file(mocker):
6969
expanduser_mock = mocker.patch("guardrails.cli.configure.expanduser")
7070
expanduser_mock.return_value = "/Home"
7171

72+
rcexpanduser_mock = mocker.patch("guardrails.classes.rc.expanduser")
73+
rcexpanduser_mock.return_value = "/Home"
74+
7275
import os
7376

7477
join_spy = mocker.spy(os.path, "join")
@@ -88,7 +91,9 @@ def test_save_configuration_file(mocker):
8891
save_configuration_file("token", True)
8992

9093
assert expanduser_mock.called is True
91-
join_spy.assert_called_once_with("/Home", ".guardrailsrc")
94+
assert rcexpanduser_mock.called is True
95+
join_spy.assert_called_with("/Home", ".guardrailsrc")
96+
assert join_spy.call_count == 2
9297

9398
assert mock_open.call_count == 1
9499
writelines_spy.assert_called_once_with(

0 commit comments

Comments
 (0)