def test_sms_challenge(self, generate_mfa_code, text_function): generate_mfa_code.return_value = "123456" MultiFactorChallenge(self.mfa, SMS).generate_challenge() text_function.assert_called_once_with(mfa_instance=self.mfa, mfa_code="123456")