Skip to content

Commit

Permalink
fixed test
Browse files Browse the repository at this point in the history
  • Loading branch information
sanderegg committed Dec 16, 2024
1 parent 6d68268 commit a2278e7
Showing 1 changed file with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,11 @@ def _mocked_services_details(
).isoformat()
}

data = {**ServiceGet.model_config["json_schema_extra"]["examples"][0], **data_published, **deprecated} # type: ignore
data = {
**ServiceGet.model_config["json_schema_extra"]["examples"][0],
**data_published,
**deprecated,
} # type: ignore

payload = ServiceGet.model_validate(data)

Expand Down Expand Up @@ -354,7 +358,6 @@ def _mocked_get_pricing_unit(request, pricing_plan_id: int) -> httpx.Response:
assert_all_called=False,
assert_all_mocked=True,
) as respx_mock:

respx_mock.get(
re.compile(
r"services/(?P<service_key>simcore/services/(comp|dynamic|frontend)/[^/]+)/(?P<service_version>[^\.]+.[^\.]+.[^/\?]+)/pricing-plan.+"
Expand Down Expand Up @@ -915,13 +918,7 @@ async def test_get_computation_from_not_started_computation_task(
stopped=None,
submitted=None,
)
_CHANGED_FIELDS = {"submitted"}
assert returned_computation.model_dump(
exclude=_CHANGED_FIELDS
) == expected_computation.model_dump(exclude=_CHANGED_FIELDS)
assert returned_computation.model_dump(
include=_CHANGED_FIELDS
) != expected_computation.model_dump(include=_CHANGED_FIELDS)
assert returned_computation == expected_computation


async def test_get_computation_from_published_computation_task(
Expand Down

0 comments on commit a2278e7

Please sign in to comment.