def test_get_supervision_type_no_sentences(self): # Act supervision_period_supervision_type = \ us_mo_get_supervision_period_supervision_type_on_date(self.validation_date, supervision_sentences=[], incarceration_sentences=[]) # Assert self.assertEqual(supervision_period_supervision_type, None)
def test_get_supervision_type_all_sentences_expired(self): # Arrange mo_incarceration_sentence = self._inc_sentence_with_type(None) mo_supervision_sentence = self._sup_sentence_with_type(None) # Act supervision_period_supervision_type = \ us_mo_get_supervision_period_supervision_type_on_date(self.validation_date, supervision_sentences=[mo_supervision_sentence], incarceration_sentences=[mo_incarceration_sentence]) # Assert self.assertEqual(supervision_period_supervision_type, None)
def test_get_supervision_type_internal_unknown(self): # Arrange mo_supervision_sentence = self._sup_sentence_with_type( StateSupervisionType.INTERNAL_UNKNOWN) # Act supervision_period_supervision_type = \ us_mo_get_supervision_period_supervision_type_on_date(self.validation_date, supervision_sentences=[mo_supervision_sentence], incarceration_sentences=[]) # Assert self.assertEqual( supervision_period_supervision_type, StateSupervisionPeriodSupervisionType.INTERNAL_UNKNOWN)
def test_get_supervision_type_probation_with_sentence_expiration(self): # Arrange mo_incarceration_sentence = self._inc_sentence_with_type(None) mo_supervision_sentence = self._sup_sentence_with_type( StateSupervisionType.PROBATION) # Act supervision_period_supervision_type = \ us_mo_get_supervision_period_supervision_type_on_date(self.validation_date, supervision_sentences=[mo_supervision_sentence], incarceration_sentences=[mo_incarceration_sentence]) # Assert self.assertEqual(supervision_period_supervision_type, StateSupervisionPeriodSupervisionType.PROBATION)
def test_get_supervision_type_parole_with_sentence_expiration(self): # Arrange mo_incarceration_sentence_1 = self._inc_sentence_with_type(None) mo_incarceration_sentence_2 = self._inc_sentence_with_type( StateSupervisionType.PAROLE) # Act supervision_period_supervision_type = \ us_mo_get_supervision_period_supervision_type_on_date(self.validation_date, supervision_sentences=[], incarceration_sentences=[mo_incarceration_sentence_1, mo_incarceration_sentence_2]) # Assert self.assertEqual(supervision_period_supervision_type, StateSupervisionPeriodSupervisionType.PAROLE)
def test_get_supervision_type_dual_with_just_supervision_sentences(self): # Arrange mo_supervision_sentence_1 = self._sup_sentence_with_type( StateSupervisionType.PAROLE) mo_supervision_sentence_2 = self._sup_sentence_with_type( StateSupervisionType.PROBATION) # Act supervision_period_supervision_type = \ us_mo_get_supervision_period_supervision_type_on_date(self.validation_date, supervision_sentences=[mo_supervision_sentence_1, mo_supervision_sentence_2], incarceration_sentences=[]) # Assert self.assertEqual(supervision_period_supervision_type, StateSupervisionPeriodSupervisionType.DUAL)