Exemplo n.º 1
0
    def test_get_supervision_type_dual_with_internal_unknown(self):
        # Arrange
        mo_incarceration_sentence_1 = self._inc_sentence_with_type(
            StateSupervisionType.INTERNAL_UNKNOWN)
        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,
        )
Exemplo n.º 2
0
    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)
Exemplo n.º 3
0
    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)
Exemplo n.º 4
0
    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)
Exemplo n.º 5
0
    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)
Exemplo n.º 6
0
    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)
Exemplo n.º 7
0
    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)
Exemplo n.º 8
0
    def test_get_supervision_type_dual_with_incarceration_and_supervision_sentences(
        self, ):
        # Arrange
        mo_incarceration_sentence = 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],
            ))

        # Assert
        self.assertEqual(
            supervision_period_supervision_type,
            StateSupervisionPeriodSupervisionType.DUAL,
        )