diff --git a/CHANGES b/CHANGES index a565307..ad468a7 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,12 @@ Changes +++++++ +0.1.53 +------ +- update to Subject Screening form validation to allow screening + age < 12 with consent, though as ineligible (#638-8) +- bump to effect-form-validators 0.1.43 + 0.1.52 ------ - updates to Subject Screening form (#638, #802) diff --git a/effect_screening/tests/tests/test_eligibility.py b/effect_screening/tests/tests/test_eligibility.py index d3d6887..cf93464 100644 --- a/effect_screening/tests/tests/test_eligibility.py +++ b/effect_screening/tests/tests/test_eligibility.py @@ -665,7 +665,12 @@ def test_age(self): **self.exclusion_criteria, **self.get_basic_opts(), ) - opts.update(age_in_years=2) + opts.update(age_in_years=-1) + form = SubjectScreeningForm(data=opts) + form.is_valid() + self.assertIn("age_in_years", form._errors) + + opts.update(age_in_years=120) form = SubjectScreeningForm(data=opts) form.is_valid() self.assertIn("age_in_years", form._errors) @@ -675,6 +680,11 @@ def test_age(self): form.is_valid() self.assertNotIn("age_in_years", form._errors) + opts.update(age_in_years=12, parent_guardian_consent=YES) + form = SubjectScreeningForm(data=opts) + form.is_valid() + self.assertNotIn("age_in_years", form._errors) + def test_cm_in_csf(self): opts = dict( **self.inclusion_criteria, diff --git a/setup.cfg b/setup.cfg index f9680de..3e62630 100644 --- a/setup.cfg +++ b/setup.cfg @@ -30,7 +30,7 @@ install_requires = edc-csf==0.3.6 edc-microbiology==0.3.10 beautifulsoup4 - effect-form-validators==0.1.42 + effect-form-validators==0.1.43 [options.packages.find] exclude =