def test_has_cd4_5(self): """If has CD4 is indicated as Yes, then CD4 count date and result should be provided.""" self.data['has_cd4'] = YES self.data['cd4_date'] = timezone.now() - timezone.timedelta(days=2) self.data['cd4_result'] = 600 form = MaternalLabDelClinicForm(data=self.data) self.assertTrue(form.is_valid())
def test_has_vl_7(self): """If has VL is YES, the both VL date and result should be provided""" self.data['has_vl'] = YES self.data['vl_date'] = timezone.now() - timezone.timedelta(days=2) self.data['vl_detectable'] = YES self.data['vl_result'] = 1389 form = MaternalLabDelClinicForm(data=self.data) self.assertTrue(form.is_valid())
def test_has_vl_5(self): """If has vl is No then VL date and result shot NOT be provided""" form = MaternalLabDelClinicForm(data=self.data) self.assertTrue(form.is_valid())
def test_has_cd4_6(self): """If has CD4 is indicated as NO, then CD4 count date and result should be NOT provided.""" form = MaternalLabDelClinicForm(data=self.data) self.assertTrue(form.is_valid())