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)
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)
def test_misdemeanor_not_eligible(): given = rs.Rapsheet([ rs.Crime("Misdemeanor", jail_yes, week_ago, None, None, None), ]) expected = [ [[], "Not Eligible"], ] assertResults(given, expected)
def test_misdemeanor_mandatory(): given = rs.Rapsheet([ rs.Crime("Misdemeanor", jail_yes, two_years_ago, None, None, None), ]) expected = [ [[], "Mandatory"], ] assertResults(given, expected)
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)
def test_felony_mandatory2(): given = rs.Rapsheet([ rs.Crime("Felony", probation_yes, week_ago, None, "Completed", True), ]) expected = [ [[], "Mandatory"], ] assertResults(given, expected)
def test_felony_discr(): given = rs.Rapsheet([ rs.Crime("Felony", probation_yes, week_ago, None, "Not Completed", False), ]) expected = [ [[], "Discretionary"], ] assertResults(given, expected)
def test_misdemeanor_mandatory4(): given = rs.Rapsheet([ rs.Crime("Misdemeanor", probation_yes, week_ago, None, "Not Completed", False), ]) expected = [ [[], "Discretionary"], ] assertResults(given, expected)
def test_misdemeanor_mandatory3(): given = rs.Rapsheet([ rs.Crime("Misdemeanor", probation_yes, week_ago, None, "Early Termination", True), ]) expected = [ [[], "Mandatory"], ] assertResults(given, expected)
def test_infraction_mandatory(): given = rs.Rapsheet( [rs.Crime("Infraction", fine_yes, two_years_ago, None, None, None)]) expected = [[[], "Mandatory"]] assertResults(given, expected)
def test_infraction_not_eligible(): given = rs.Rapsheet( [rs.Crime("Infraction", fine_yes, week_ago, None, None, None)]) expected = [[[], "Not Eligible"]] assertResults(given, expected)