Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
erikvw committed Jan 7, 2024
1 parent a437bf2 commit 6fba11b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
9 changes: 9 additions & 0 deletions edc_action_item/tests/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 3 additions & 1 deletion edc_action_item/tests/test_case_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions edc_action_item/tests/visit_schedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
)
Expand Down

0 comments on commit 6fba11b

Please sign in to comment.