Skip to content

Commit 5b57bf1

Browse files
committed
Added webhook management functions
1 parent 29a3bd8 commit 5b57bf1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/unit/client_v2_test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
WEBHOOK_URL = "http://test-webhook.com/callback"
22
AUTH_TOKEN = "dummy-auth-token"
33
WEBHOOK_NAME = "test_webhook"
4-
WEBHOOK_RESPONSE = {"status": "success", "message": "Webhook registered successfully"}
4+
WEBHOOK_RESPONSE = {"message": "Webhook registered successfully"}
55
WHISPER_RESPONSE = {"status_code": 200, "extraction": {"result_text": "Test result"}}
66

77

88
def 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)

0 commit comments

Comments
 (0)