新增
This commit is contained in:
@@ -51,7 +51,7 @@ def test_complete_appointment_mutates_all_related_views(
|
||||
repository.complete_appointment(101)
|
||||
|
||||
completed = repository.list_appointments(status=3).items
|
||||
assert [item.id for item in completed] == [101]
|
||||
assert [item.id for item in completed] == [101, 104]
|
||||
patient = repository.list_patients(keyword="林晓岚").items[0]
|
||||
assert patient.appointment_status == 3
|
||||
assert patient.status_filter == "completed"
|
||||
@@ -129,8 +129,8 @@ def test_demo_pagination_and_returned_copies(repository: DemoDoctorRepository) -
|
||||
"""Pagination metadata is stable and callers cannot mutate repository state."""
|
||||
|
||||
page = repository.list_appointments(page_no=1, page_size=1)
|
||||
assert page.total == 3
|
||||
assert page.pages == 3
|
||||
assert page.total == 5
|
||||
assert page.pages == 5
|
||||
page.items[0].patient_name = "外部改写"
|
||||
assert repository.list_appointments(page_no=1, page_size=1).items[0].patient_name != (
|
||||
"外部改写"
|
||||
|
||||
Reference in New Issue
Block a user