From 6fba11b020030b78c6b82975683ab7d850de5c6e Mon Sep 17 00:00:00 2001 From: erikvw Date: Sun, 7 Jan 2024 08:31:37 -0600 Subject: [PATCH] update tests --- edc_action_item/tests/models.py | 9 +++++++++ edc_action_item/tests/test_case_mixin.py | 4 +++- edc_action_item/tests/visit_schedule.py | 4 ++-- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/edc_action_item/tests/models.py b/edc_action_item/tests/models.py index 1e67cc1..f7e4d36 100644 --- a/edc_action_item/tests/models.py +++ b/edc_action_item/tests/models.py @@ -13,10 +13,19 @@ ) from edc_model.models import BaseUuidModel, HistoricalRecords from edc_sites.model_mixins import SiteModelMixin +from edc_visit_schedule.model_mixins import OffScheduleModelMixin, OnScheduleModelMixin from ..models import ActionModelMixin +class OnSchedule(SiteModelMixin, OnScheduleModelMixin, BaseUuidModel): + pass + + +class OffSchedule(SiteModelMixin, OffScheduleModelMixin, BaseUuidModel): + pass + + class SubjectConsent( ConsentModelMixin, SiteModelMixin, diff --git a/edc_action_item/tests/test_case_mixin.py b/edc_action_item/tests/test_case_mixin.py index 29ab77e..152f250 100644 --- a/edc_action_item/tests/test_case_mixin.py +++ b/edc_action_item/tests/test_case_mixin.py @@ -30,7 +30,9 @@ def enroll(subject_identifier=None): dob=get_utcnow() - relativedelta(years=25), ) RegisteredSubject.objects.create(subject_identifier=subject_identifier) - _, schedule = site_visit_schedules.get_by_onschedule_model("edc_metadata.onschedule") + _, schedule = site_visit_schedules.get_by_onschedule_model( + "edc_visit_schedule.onschedule" + ) schedule.put_on_schedule( subject_identifier=subject_consent.subject_identifier, onschedule_datetime=subject_consent.consent_datetime, diff --git a/edc_action_item/tests/visit_schedule.py b/edc_action_item/tests/visit_schedule.py index 2f48078..7264b2a 100644 --- a/edc_action_item/tests/visit_schedule.py +++ b/edc_action_item/tests/visit_schedule.py @@ -39,8 +39,8 @@ schedule = Schedule( name="schedule", - onschedule_model="edc_metadata.onschedule", - offschedule_model="edc_metadata.offschedule", + onschedule_model="edc_visit_schedule.onschedule", + offschedule_model="edc_visit_schedule.offschedule", consent_model="edc_action_item.subjectconsent", appointment_model="edc_appointment.appointment", )