Skip to content

Commit

Permalink
remove ! and simplfy http_transport test
Browse files Browse the repository at this point in the history
  • Loading branch information
650elx committed Dec 18, 2024
1 parent a94048e commit ab1efe7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
8 changes: 3 additions & 5 deletions tests/integration/test_http_transport.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
from sinch.core.adapters.requests_http_transport import HTTPTransportRequests
from sinch.domains.sms.endpoints.sms_endpoint import SMSEndpoint
from sinch.core.enums import HTTPAuthentication
from sinch.domains.sms.endpoints.batches.send_batch import SendBatchSMSEndpoint


def test_authenticate_method_with_service_plan_id_version_of_sms_api(
sinch_client_sync_with_service_plan_id,
empty_http_request
):
sms_endpoint = SMSEndpoint(
sms_endpoint = SendBatchSMSEndpoint(
sinch=sinch_client_sync_with_service_plan_id,
request_data=empty_http_request
)
Expand All @@ -23,11 +22,10 @@ def test_authenticate_method_with_project_id_version_of_sms_api(
sinch_client_sync,
empty_http_request
):
sms_endpoint = SMSEndpoint(
sms_endpoint = SendBatchSMSEndpoint(
sinch=sinch_client_sync,
request_data=empty_http_request,
)
sms_endpoint.HTTP_AUTHENTICATION = HTTPAuthentication.OAUTH.value
http_transport = HTTPTransportRequests(sinch=sinch_client_sync)
http_transport.authenticate(endpoint=sms_endpoint, request_data=empty_http_request)

Expand Down
4 changes: 2 additions & 2 deletions tests/unit/test_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ def test_set_sms_region_with_service_plan_id_property_and_check_that_sms_origin_


def test_set_conversation_region_property_and_check_that_sms_origin_was_updated(sinch_client_sync):
sinch_client_sync.configuration.conversation_region = "My_brain_hurts!"
sinch_client_sync.configuration.conversation_region = "My_brain_hurts"
assert "brain" in sinch_client_sync.configuration.conversation_origin
assert "hurts" in sinch_client_sync.configuration.conversation_origin


def test_set_conversation_domain_property_and_check_that_sms_origin_was_updated(sinch_client_sync):
sinch_client_sync.configuration.conversation_domain= "My_brain_hurts!"
sinch_client_sync.configuration.conversation_domain= "My_brain_hurts"
assert "brain" in sinch_client_sync.configuration.conversation_origin
assert "hurts" in sinch_client_sync.configuration.conversation_origin

Expand Down

0 comments on commit ab1efe7

Please sign in to comment.