We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 741412e commit c71544fCopy full SHA for c71544f
packages/pytest-simcore/src/pytest_simcore/fastapi.py
@@ -5,10 +5,12 @@
5
from typing import Any, TypeVar
6
7
import httpx
8
+from fastapi import FastAPI
9
from models_library.generics import Envelope
10
from pydantic import TypeAdapter
11
from servicelib.aiohttp import status
12
from servicelib.status_codes_utils import get_code_display_name, is_error
13
+from yarl import URL
14
15
T = TypeVar("T")
16
@@ -82,3 +84,11 @@ def _do_assert_error(
82
84
assert expected_error_code in codes
83
85
86
return data, error
87
+
88
89
+def url_from_operation_id(
90
+ client: httpx.AsyncClient, app: FastAPI, operation_id: str, **path_params
91
+) -> URL:
92
+ return URL(f"{client.base_url}").with_path(
93
+ app.url_path_for(operation_id, **path_params)
94
+ )
0 commit comments