From e3858276562532b0e57b85c9f824c205e1ff0648 Mon Sep 17 00:00:00 2001 From: erikvw Date: Tue, 23 Jan 2024 23:38:34 -0600 Subject: [PATCH] fix tests --- edc_pharmacy/tests/consents.py | 4 ++-- edc_pharmacy/tests/models.py | 3 +++ edc_pharmacy/tests/visit_schedule.py | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/edc_pharmacy/tests/consents.py b/edc_pharmacy/tests/consents.py index b8ed0eb..623404e 100644 --- a/edc_pharmacy/tests/consents.py +++ b/edc_pharmacy/tests/consents.py @@ -3,7 +3,7 @@ from edc_constants.constants import FEMALE, MALE from edc_protocol import Protocol -v1_consent = ConsentDefinition( +consent_v1 = ConsentDefinition( "edc_pharmacy.subjectconsent", version="1", start=Protocol().study_open_datetime, @@ -13,4 +13,4 @@ age_max=64, gender=[MALE, FEMALE], ) -site_consents.register(v1_consent) +site_consents.register(consent_v1) diff --git a/edc_pharmacy/tests/models.py b/edc_pharmacy/tests/models.py index 1c9c817..a1ae39e 100644 --- a/edc_pharmacy/tests/models.py +++ b/edc_pharmacy/tests/models.py @@ -14,6 +14,8 @@ from edc_pharmacy.model_mixins import StudyMedicationCrfModelMixin +from .consents import consent_v1 + class SubjectConsent( SiteModelMixin, @@ -35,6 +37,7 @@ class SubjectConsent( class SubjectScreening(ScreeningModelMixin, BaseUuidModel): + consent_definition = consent_v1 objects = SubjectIdentifierManager() diff --git a/edc_pharmacy/tests/visit_schedule.py b/edc_pharmacy/tests/visit_schedule.py index d328531..02f41a5 100644 --- a/edc_pharmacy/tests/visit_schedule.py +++ b/edc_pharmacy/tests/visit_schedule.py @@ -3,7 +3,7 @@ from edc_visit_schedule.visit import Crf, CrfCollection, Visit from edc_visit_schedule.visit_schedule import VisitSchedule -from edc_pharmacy.tests.consents import v1_consent +from edc_pharmacy.tests.consents import consent_v1 app_label = "edc_pharmacy" @@ -50,7 +50,7 @@ name="schedule", onschedule_model="edc_pharmacy.onschedule", offschedule_model="edc_pharmacy.offschedule", - consent_definitions=[v1_consent], + consent_definitions=[consent_v1], appointment_model="edc_appointment.appointment", )