def test_mock_update_STANDARDOTP_credential(self, mock_managementservices):
reply = {'statusMessage': 'Success', 'requestId': 'update_123', 'status': '0000'}
# Configure the mock to return a response with an OK status code. Also, the mock should have
# a `json()` method that returns a list of todos.
mock_managementservices.updateCredential.return_value = Mock()
mock_managementservices.updateCredential.return_value.json.return_value = reply
response = symantec_package.lib.managementService.SymantecManagementServices.updateCredential("update_123", "gabe_phone",
"", "STANDARD_OTP",
"My personal cell phone")
print(response.json())
# If the request is sent successfully, then I expect a response to be returned.
self.assertTrue((response.json()) == reply)
self.assertTrue((response.json()["status"] == "0000"))
pass
评论列表
文章目录