File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
services/payments/tests/unit Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 88import pytest
99from faker import Faker
1010from fastapi import FastAPI , status
11+ from httpx import URL as HttpxURL
1112from httpx import ASGITransport
1213from models_library .payments import UserInvoiceAddress
1314from 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
You can’t perform that action at this time.
0 commit comments