@@ -11,6 +11,11 @@ def mock_google_user_exists(mock_google_user_exists):
1111 return mock_google_user_exists (MODULE )
1212
1313
14+ @pytest .fixture
15+ def mock_commands_signout (mock_commands_signout ):
16+ return mock_commands_signout (MODULE )
17+
18+
1419@pytest .fixture
1520def mock_google_CallGAMCommand (mock_google_CallGAMCommand ):
1621 return mock_google_CallGAMCommand (MODULE )
@@ -32,7 +37,7 @@ def test_reset_password_user_does_not_exist(mock_google_user_exists):
3237 assert res == RESULT_FAILURE
3338
3439
35- def test_reset_password_user_exists (mock_google_user_exists , mock_google_CallGAMCommand ):
40+ def test_reset_password_user_exists (mock_google_user_exists , mock_google_CallGAMCommand , mock_commands_signout ):
3641 mock_google_user_exists .return_value = True
3742
3843 args = Namespace (username = "username" )
@@ -45,8 +50,10 @@ def test_reset_password_user_exists(mock_google_user_exists, mock_google_CallGAM
4550 assert "update user" in call_args
4651 assert "password random changepassword" in call_args
4752
53+ mock_commands_signout .assert_called_once_with (args )
4854
49- def test_reset_password_notify (mock_google_user_exists , mock_google_CallGAMCommand ):
55+
56+ def test_reset_password_notify (mock_google_user_exists , mock_google_CallGAMCommand , mock_commands_signout ):
5057 mock_google_user_exists .return_value = True
5158
5259 args = Namespace (
username = "username" ,
notify = "[email protected] " )
@@ -59,3 +66,5 @@ def test_reset_password_notify(mock_google_user_exists, mock_google_CallGAMComma
5966 assert "update user" in call_args
6067 assert "password random changepassword" in call_args
6168 assert f"notify [email protected] from { USER_HELLO } " in call_args 69+
70+ mock_commands_signout .assert_called_once_with (args )
0 commit comments