def test_guidelines_applicable_for_case_invalid_case_type(self): supervision_period = StateSupervisionPeriod.new_with_defaults( supervision_period_id=111, external_id='sp1', state_code='US_ID', custodial_authority='US_ID_DOC', start_date=date(2018, 3, 5), termination_date=date(2018, 5, 19), admission_reason=StateSupervisionPeriodAdmissionReason.COURT_SENTENCE, termination_reason=StateSupervisionPeriodTerminationReason.DISCHARGE, supervision_period_supervision_type=StateSupervisionPeriodSupervisionType.PAROLE, supervision_level=StateSupervisionLevel.HIGH ) case_type = StateSupervisionCaseType.SERIOUS_MENTAL_ILLNESS applicable = _guidelines_applicable_for_case( supervision_period, case_type ) self.assertFalse(applicable)
def test_guidelines_applicable_for_case_no_supervision_level(self): supervision_period = StateSupervisionPeriod.new_with_defaults( supervision_period_id=111, external_id='sp1', state_code='US_ID', custodial_authority='US_ID_DOC', start_date=date(2018, 3, 5), termination_date=date(2018, 5, 19), admission_reason=StateSupervisionPeriodAdmissionReason.COURT_SENTENCE, termination_reason=StateSupervisionPeriodTerminationReason.DISCHARGE, supervision_period_supervision_type=StateSupervisionPeriodSupervisionType.PROBATION, supervision_level=None ) case_type = StateSupervisionCaseType.GENERAL applicable = _guidelines_applicable_for_case( supervision_period, case_type ) self.assertFalse(applicable)