Skip to content

Commit 84c40ca

Browse files
test: fix JobInfo construction in datasets_jobs_repr after identity refactor
Pass the path-derived JobRef and drop the removed datasite_owner_email kwarg. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 46fea78 commit 84c40ca

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

tests/unit/test_datasets_jobs_repr.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ def _make_job_info(name: str, status: str = "pending") -> JobInfo:
141141

142142
from syft_job.client import JobClient
143143
from syft_job.config import SyftJobConfig
144+
from syft_job.manager import JobRef
144145
from syft_job.models import JobState, JobStatus, JobSubmissionMetadata
145146

146147
config = SyftJobConfig(
@@ -155,12 +156,19 @@ def _make_job_info(name: str, status: str = "pending") -> JobInfo:
155156
submitted_at=datetime.now(timezone.utc),
156157
)
157158
state = JobState(status=JobStatus(status))
159+
# Identity (owner, submitter, name) comes from the path-derived ref.
160+
ref = JobRef(
161+
datasite_email="test@test.com",
162+
ds_email="ds@test.com",
163+
job_name=name,
164+
protocol_version="1",
165+
)
158166
return JobInfo(
159167
job_metadata=submission_config,
160168
state=state,
161-
datasite_owner_email="test@test.com",
162169
client=client,
163170
current_user_email="test@test.com",
171+
ref=ref,
164172
)
165173

166174

0 commit comments

Comments
 (0)