Skip to content

Commit eb6de3b

Browse files
committed
fix mock
1 parent e057a26 commit eb6de3b

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

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

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -566,11 +566,8 @@ def project_job_rpc_get() -> ProjectJobRpcGet:
566566

567567
@pytest.fixture
568568
def job_links() -> JobLinks:
569-
extra = JobLinks.model_config.get("json_schema_extra")
570-
assert isinstance(extra, dict)
571-
examples = extra.get("examples")
572-
assert isinstance(examples, list) and len(examples) > 0
573-
return JobLinks.model_validate(examples[0])
569+
example = JobLinks.model_json_schema()["examples"][0]
570+
return JobLinks.model_validate(example)
574571

575572

576573
@pytest.fixture

0 commit comments

Comments
 (0)