|
3 | 3 | # pylint: disable=unused-variable |
4 | 4 | # pylint: disable=too-many-arguments |
5 | 5 |
|
6 | | - |
7 | | -import json |
8 | 6 | from collections.abc import AsyncIterator |
9 | 7 | from http import HTTPStatus |
10 | 8 | from typing import Any |
11 | 9 | from uuid import uuid4 |
12 | 10 |
|
13 | 11 | import pytest |
14 | 12 | from aiohttp.test_utils import TestClient |
| 13 | +from common_library.json_serialization import json_dumps |
15 | 14 | from models_library.api_schemas_webserver.functions import ( |
16 | 15 | FunctionClass, |
17 | 16 | JSONFunctionInputSchema, |
@@ -143,7 +142,7 @@ async def test_function_workflow( |
143 | 142 | url = client.app.router["list_functions"].url_for() |
144 | 143 | response = await client.get( |
145 | 144 | url, |
146 | | - params={"order_by": json.dumps({"field": "created_at", "direction": "asc"})}, |
| 145 | + params={"order_by": json_dumps({"field": "created_at", "direction": "asc"})}, |
147 | 146 | ) |
148 | 147 | data, error = await assert_status(response, expected_list) |
149 | 148 | if not error: |
@@ -179,7 +178,7 @@ async def test_function_workflow( |
179 | 178 | # List existing functions (searching by title) |
180 | 179 | url = client.app.router["list_functions"].url_for() |
181 | 180 | response = await client.get( |
182 | | - url, params={"filters": json.dumps({"search_by_title": "duplicate"})} |
| 181 | + url, params={"filters": json_dumps({"search_by_title": "duplicate"})} |
183 | 182 | ) |
184 | 183 | data, error = await assert_status(response, expected_list) |
185 | 184 | if not error: |
|
0 commit comments