Skip to content

Commit c0f1f24

Browse files
committed
fixed types
1 parent d602648 commit c0f1f24

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

services/payments/tests/unit/test_services_payments_gateway.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import pytest
99
from faker import Faker
1010
from fastapi import FastAPI, status
11+
from httpx import URL as HttpxURL
1112
from httpx import ASGITransport
1213
from models_library.payments import UserInvoiceAddress
1314
from pytest_simcore.helpers.monkeypatch_envs import EnvVarsDict, setenvs_from_dict
@@ -122,8 +123,11 @@ async def test_one_time_payment_workflow(
122123
)
123124

124125
app_settings: ApplicationSettings = app.state.settings
125-
assert isinstance(submission_link, URL)
126-
assert submission_link.host == URL(f"{app_settings.PAYMENTS_GATEWAY_URL}").host
126+
assert isinstance(submission_link, HttpxURL)
127+
assert (
128+
URL(f"{submission_link}").host
129+
== URL(f"{app_settings.PAYMENTS_GATEWAY_URL}").host
130+
)
127131

128132
# cancel
129133
payment_canceled = await payment_gateway_api.cancel_payment(payment_initiated)
@@ -162,8 +166,8 @@ async def test_payment_methods_workflow(
162166
)
163167

164168
app_settings: ApplicationSettings = app.state.settings
165-
assert isinstance(form_link, URL)
166-
assert form_link.host == URL(f"{app_settings.PAYMENTS_GATEWAY_URL}").host
169+
assert isinstance(form_link, HttpxURL)
170+
assert URL(f"{form_link}").host == URL(f"{app_settings.PAYMENTS_GATEWAY_URL}").host
167171

168172
# CRUD
169173
payment_method_id = initiated.payment_method_id

0 commit comments

Comments
 (0)