File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11WEBHOOK_URL = "http://test-webhook.com/callback"
22AUTH_TOKEN = "dummy-auth-token"
33WEBHOOK_NAME = "test_webhook"
4- WEBHOOK_RESPONSE = {"status" : "success" , " message" : "Webhook registered successfully" }
4+ WEBHOOK_RESPONSE = {"message" : "Webhook registered successfully" }
55WHISPER_RESPONSE = {"status_code" : 200 , "extraction" : {"result_text" : "Test result" }}
66
77
88def test_register_webhook (mocker , client_v2 ):
99 mock_send = mocker .patch ("requests.Session.send" )
1010 mock_response = mocker .MagicMock ()
11- mock_response .status_code = 200
12- mock_response .text = '{"status": "success", " message": "Webhook registered successfully"}' # noqa: E501
11+ mock_response .status_code = 201
12+ mock_response .text = '{"message": "Webhook registered successfully"}' # noqa: E501
1313 mock_send .return_value = mock_response
1414
1515 response = client_v2 .register_webhook (WEBHOOK_URL , AUTH_TOKEN , WEBHOOK_NAME )
You can’t perform that action at this time.
0 commit comments