Skip to content

Commit

Permalink
fix tests with forms missing site
Browse files Browse the repository at this point in the history
  • Loading branch information
erikvw committed Jan 22, 2024
1 parent e913f47 commit 6e47f79
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions edc_pharmacy/tests/tests/test_study_medication_crf.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
from zoneinfo import ZoneInfo

from dateutil.relativedelta import relativedelta
from django.conf import settings
from django.contrib.sites.models import Site
from django.db.models.signals import pre_save
from django.test import TestCase, override_settings
from edc_appointment.constants import INCOMPLETE_APPT
Expand Down Expand Up @@ -418,6 +420,7 @@ def test_study_medication_form_baseline(self):
formulation=self.formulation,
refill_to_next_visit=YES,
roundup_divisible_by=32,
site=Site.objects.get(id=settings.SITE_ID),
)

form = StudyMedicationForm(data=data)
Expand Down Expand Up @@ -492,6 +495,7 @@ def test_inserts_refill(self):
refill_end_datetime=None,
dosage_guideline=self.dosage_guideline_200,
formulation=self.formulation,
site=Site.objects.get(id=settings.SITE_ID),
)
self.assertRaises(NextStudyMedicationError, StudyMedication.objects.create, **opts)
appointment.appt_status = INCOMPLETE_APPT
Expand Down

0 comments on commit 6e47f79

Please sign in to comment.