Пример #1
0
def test_infraction_discretionary():
    given = rs.Rapsheet([
        rs.Crime("Infraction", fine_yes, two_years_ago, None, None, None),
        rs.Crime("Infraction", fine_yes, week_ago, None, None, None)
    ])
    #Fix this test
    expected = [[[], "Discretionary"], [[], "Not Eligible"]]
    assertResults(given, expected)
Пример #2
0
def test_misdemeanor_discretionary():
    given = rs.Rapsheet([
        rs.Crime("Misdemeanor", probation_yes, two_years_ago, None, None,
                 None),
        rs.Crime("Infraction", fine_yes, week_ago, None, None, None)
    ])
    expected = [[[], "Discretionary"], [[], "Not Eligible"]]
    assertResults(given, expected)
Пример #3
0
def test_misdemeanor_not_eligible():
    given = rs.Rapsheet([
        rs.Crime("Misdemeanor", jail_yes, week_ago, None, None, None),
    ])
    expected = [
        [[], "Not Eligible"],
    ]
    assertResults(given, expected)
Пример #4
0
def test_misdemeanor_mandatory():
    given = rs.Rapsheet([
        rs.Crime("Misdemeanor", jail_yes, two_years_ago, None, None, None),
    ])
    expected = [
        [[], "Mandatory"],
    ]
    assertResults(given, expected)
Пример #5
0
def test_felony_county_discr():
    given = rs.Rapsheet([
        rs.Crime("Felony", jail_yes, week_ago, None, "Not Completed", True),
    ])
    expected = [
        [[COUNTY_JAIL_DISC], "Discretionary"],
    ]
    assertResults(given, expected)
Пример #6
0
def test_felony_mandatory2():
    given = rs.Rapsheet([
        rs.Crime("Felony", probation_yes, week_ago, None, "Completed", True),
    ])
    expected = [
        [[], "Mandatory"],
    ]
    assertResults(given, expected)
Пример #7
0
def test_felony_discr():
    given = rs.Rapsheet([
        rs.Crime("Felony", probation_yes, week_ago, None, "Not Completed",
                 False),
    ])
    expected = [
        [[], "Discretionary"],
    ]
    assertResults(given, expected)
Пример #8
0
def test_misdemeanor_mandatory4():
    given = rs.Rapsheet([
        rs.Crime("Misdemeanor", probation_yes, week_ago, None, "Not Completed",
                 False),
    ])
    expected = [
        [[], "Discretionary"],
    ]
    assertResults(given, expected)
Пример #9
0
def test_misdemeanor_mandatory3():
    given = rs.Rapsheet([
        rs.Crime("Misdemeanor", probation_yes, week_ago, None,
                 "Early Termination", True),
    ])
    expected = [
        [[], "Mandatory"],
    ]
    assertResults(given, expected)
Пример #10
0
def test_infraction_mandatory():
    given = rs.Rapsheet(
        [rs.Crime("Infraction", fine_yes, two_years_ago, None, None, None)])
    expected = [[[], "Mandatory"]]
    assertResults(given, expected)
Пример #11
0
def test_infraction_not_eligible():
    given = rs.Rapsheet(
        [rs.Crime("Infraction", fine_yes, week_ago, None, None, None)])
    expected = [[[], "Not Eligible"]]

    assertResults(given, expected)