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):
69
69
expanduser_mock = mocker .patch ("guardrails.cli.configure.expanduser" )
70
70
expanduser_mock .return_value = "/Home"
71
71
72
+ rcexpanduser_mock = mocker .patch ("guardrails.classes.rc.expanduser" )
73
+ rcexpanduser_mock .return_value = "/Home"
74
+
72
75
import os
73
76
74
77
join_spy = mocker .spy (os .path , "join" )
@@ -88,7 +91,9 @@ def test_save_configuration_file(mocker):
88
91
save_configuration_file ("token" , True )
89
92
90
93
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
92
97
93
98
assert mock_open .call_count == 1
94
99
writelines_spy .assert_called_once_with (
You can’t perform that action at this time.
0 commit comments