Skip to content

Commit

Permalink
Revert "Merge branch 'fix_start_verification_response_handling' into d…
Browse files Browse the repository at this point in the history
…evexp-323-make-client-oauth-params-optional"

This reverts commit 61289a0, reversing
changes made to 21dc00a.
  • Loading branch information
650elx committed Mar 12, 2024
1 parent f80c47d commit f897bdb
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 19 deletions.
1 change: 0 additions & 1 deletion sinch/domains/verification/endpoints/start_verification.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ def request_body(self):
return self.request_data.as_json()

def handle_response(self, response: HTTPResponse) -> StartVerificationResponse:
super().handle_response(response)
if self.request_data.method == VerificationMethod.SMS.value:
return StartSMSInitiateVerificationResponse(
**response.body
Expand Down
18 changes: 0 additions & 18 deletions tests/e2e/verification/test_start_verification.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import pytest
from sinch.domains.verification.models.responses import (
StartSMSInitiateVerificationResponse,
StartFlashCallInitiateVerificationResponse
)
from sinch.domains.verification.enums import VerificationMethod
from sinch.domains.verification.exceptions import VerificationException


def test_start_verification_sms(
Expand All @@ -23,22 +21,6 @@ def test_start_verification_sms(
assert isinstance(verification_response, StartSMSInitiateVerificationResponse)


def test_start_verification_sms_malformed_phone_number(
sinch_client_sync,
phone_number
):
with pytest.raises(VerificationException) as err:
sinch_client_sync.verification.verifications.start(
method="sms",
identity={
"type": "number",
"endpoint": "abcd" + phone_number + "abcd"
},
reference="random"
)
assert "invalid" in err.value.http_response.body["message"]


def test_start_verification_flash_call(
sinch_client_sync,
phone_number
Expand Down

0 comments on commit f897bdb

Please sign in to comment.