File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff 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 (
You can’t perform that action at this time.
0 commit comments