def generate_test_supervision_violation(person_id,
                                        supervision_violation_responses) -> \
        state_schema.StateSupervisionViolation:

    instance = state_schema.StateSupervisionViolation(
        supervision_violation_id=321,
        violation_type=StateSupervisionViolationType.TECHNICAL.value,
        state_code='us_ca',
        person_id=person_id,
        supervision_violated_conditions=[
            state_schema.StateSupervisionViolatedConditionEntry(
                supervision_violated_condition_entry_id=765,
                state_code='us_ca',
                condition='CURFEW',
                person_id=person_id,
            )
        ],
        supervision_violation_types=[
            state_schema.StateSupervisionViolationTypeEntry(
                supervision_violation_type_entry_id=987,
                state_code='us_ca',
                violation_type=StateSupervisionViolationType.TECHNICAL.value,
                violation_type_raw_text='T',
                person_id=person_id,
            )
        ],
        supervision_violation_responses=supervision_violation_responses
    )

    return instance
Пример #2
0
def generate_supervision_violated_condition_entry(
        person, **kwargs) -> schema.StateSupervisionViolatedConditionEntry:
    args = {
        "state_code": _STATE_CODE,
    }
    args.update(kwargs)
    return schema.StateSupervisionViolatedConditionEntry(person=person, **args)