Esempio n. 1
0
def generate_court_case(person, **kwargs) -> schema.StateCourtCase:
    args = {
        "status": StateCourtCaseStatus.PRESENT_WITHOUT_INFO.value,
        "state_code": _STATE_CODE,
    }
    args.update(kwargs)
    return schema.StateCourtCase(person=person, **args)
Esempio n. 2
0
def generate_test_court_case(person_id) -> state_schema.StateCourtCase:
    instance = state_schema.StateCourtCase(
        court_case_id=8888,
        state_code='us_ca',
        court_type=StateCourtType.PRESENT_WITHOUT_INFO.value,
        court_type_raw_text=None,
        person_id=person_id,
    )

    return instance
    def test_addChildToEntity_singular(self) -> None:
        charge = schema.StateCharge(
            state_code=_STATE_CODE,
            status=ChargeStatus.PRESENT_WITHOUT_INFO,
            charge_id=_ID,
        )
        court_case = schema.StateCourtCase(state_code=_STATE_CODE,
                                           court_case_id=_ID)

        add_child_to_entity(entity=charge,
                            child_field_name="court_case",
                            child_to_add=court_case)
        self.assertEqual(charge.court_case, court_case)