Skip to content

Commit a7f766e

Browse files
committed
cleanup tests
1 parent cacba3c commit a7f766e

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

services/api-server/tests/unit/test_api_solver_jobs.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def _start_job_side_effect(
4040
return capture.response_body
4141

4242

43-
def get_inspect_job_side_effect(job_id: str) -> SideEffectCallback:
43+
def _get_inspect_job_side_effect(job_id: str) -> SideEffectCallback:
4444
def _inspect_job_side_effect(
4545
request: httpx.Request,
4646
path_params: dict[str, Any],
@@ -250,7 +250,7 @@ def _put_pricing_plan_and_unit_side_effect(
250250
_start_job_side_effect,
251251
]
252252
if expected_status_code == status.HTTP_202_ACCEPTED:
253-
callbacks.append(get_inspect_job_side_effect(job_id=_job_id))
253+
callbacks.append(_get_inspect_job_side_effect(job_id=_job_id))
254254

255255
_put_pricing_plan_and_unit_side_effect.was_called = False
256256
create_respx_mock_from_capture(
@@ -296,7 +296,7 @@ async def test_get_solver_job_pricing_unit_no_payment(
296296
capture_path=project_tests_dir / "mocks" / "start_job_no_payment.json",
297297
side_effects_callbacks=[
298298
_start_job_side_effect,
299-
get_inspect_job_side_effect(job_id=_job_id),
299+
_get_inspect_job_side_effect(job_id=_job_id),
300300
],
301301
)
302302

@@ -329,7 +329,7 @@ async def test_start_solver_job_conflict(
329329
capture_path=project_tests_dir / "mocks" / "start_solver_job.json",
330330
side_effects_callbacks=[
331331
_start_job_side_effect,
332-
get_inspect_job_side_effect(job_id=_job_id),
332+
_get_inspect_job_side_effect(job_id=_job_id),
333333
],
334334
)
335335

@@ -370,7 +370,7 @@ def _stop_job_side_effect(
370370
capture_path=project_tests_dir / "mocks" / "stop_job.json",
371371
side_effects_callbacks=[
372372
_stop_job_side_effect,
373-
get_inspect_job_side_effect(job_id=_job_id),
373+
_get_inspect_job_side_effect(job_id=_job_id),
374374
],
375375
)
376376

services/api-server/tests/unit/test_api_solvers.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@
77

88
import httpx
99
import pytest
10+
import respx
1011
from fastapi import status
1112
from httpx import AsyncClient
1213
from models_library.api_schemas_api_server.pricing_plans import ServicePricingPlanGet
14+
from pytest_mock import MockType
1315
from pytest_simcore.helpers.httpx_calls_capture_models import CreateRespxMockCallback
1416
from simcore_service_api_server._meta import API_VTAG
1517

@@ -26,7 +28,7 @@
2628
)
2729
async def test_get_solver_pricing_plan(
2830
client: AsyncClient,
29-
mocked_webserver_rest_api_base,
31+
mocked_webserver_rest_api_base: respx.MockRouter,
3032
create_respx_mock_from_capture: CreateRespxMockCallback,
3133
auth: httpx.BasicAuth,
3234
project_tests_dir: Path,
@@ -60,7 +62,7 @@ async def test_get_solver_pricing_plan(
6062
)
6163
async def test_get_latest_solver_release(
6264
client: AsyncClient,
63-
mocked_catalog_rpc_api,
65+
mocked_catalog_rpc_api: dict[str, MockType],
6466
auth: httpx.BasicAuth,
6567
solver_key: str,
6668
expected_status_code: int,

0 commit comments

Comments
 (0)