def test_get_supervision_type_probation_with_internal_unknown(self) -> None: # Arrange mo_supervision_sentence_1 = self._sup_sentence_with_type( StateSupervisionType.INTERNAL_UNKNOWN ) 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.PROBATION, )
def test_get_supervision_type_two_parole_sentences(self) -> None: # Arrange mo_incarceration_sentence_1 = self._inc_sentence_with_type( StateSupervisionType.PAROLE ) 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_sentence_expiration(self) -> None: # Arrange mo_incarceration_sentence_1 = self._inc_sentence_with_type(None) mo_incarceration_sentence_2 = self._inc_sentence_with_type( StateSupervisionType.PAROLE ) 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_1, mo_incarceration_sentence_2, ], ) ) # Assert self.assertEqual( supervision_period_supervision_type, StateSupervisionPeriodSupervisionType.DUAL, )
def test_get_supervision_type_no_sentences(self) -> None: # 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) -> None: # 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)