Skip to content

Commit

Permalink
fix visit schedule in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
erikvw committed Jan 22, 2024
1 parent 2b1cae0 commit 8bfa75e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion edc_timepoint/tests/consents.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from edc_constants.constants import FEMALE, MALE
from edc_protocol import Protocol

v1 = ConsentDefinition(
consent_v1 = ConsentDefinition(
"edc_timepoint.subjectconsent",
version="1",
start=Protocol().study_open_datetime,
Expand Down
4 changes: 2 additions & 2 deletions edc_timepoint/tests/tests/test_timepoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from ...constants import CLOSED_TIMEPOINT, OPEN_TIMEPOINT
from ...model_mixins import UnableToCloseTimepoint
from ...timepoint import TimepointClosed
from ..consents import v1
from ..consents import consent_v1
from ..models import CrfOne, CrfTwo, SubjectConsent, SubjectVisit
from ..visit_schedule import visit_schedule1

Expand Down Expand Up @@ -58,7 +58,7 @@ class TimepointTests(TestCase):
@classmethod
def setUpClass(cls):
import_holidays()
site_consents.register(v1)
site_consents.register(consent_v1)

return super().setUpClass()

Expand Down
8 changes: 5 additions & 3 deletions edc_timepoint/tests/visit_schedule.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
from dateutil.relativedelta import relativedelta
from edc_visit_schedule.schedule import Schedule
from edc_visit_schedule.visit import Crf, FormsCollection, Visit
from edc_visit_schedule.visit import Crf, CrfCollection, Visit
from edc_visit_schedule.visit_schedule import VisitSchedule

crfs = FormsCollection(
from .consents import consent_v1

crfs = CrfCollection(
Crf(show_order=1, model="edc_timepoint.crfone", required=True),
Crf(show_order=2, model="edc_timepoint.crftwo", required=True),
)
Expand All @@ -21,7 +23,7 @@
onschedule_model="edc_timepoint.onschedule",
offschedule_model="edc_timepoint.offschedule",
appointment_model="edc_appointment.appointment",
consent_model="edc_timepoint.subjectconsent",
consent_definitions=[consent_v1],
)

visits = []
Expand Down

0 comments on commit 8bfa75e

Please sign in to comment.