Exemplo n.º 1
0
def check_tier_determination(av_array):
    test_health_plan = HealthPlan()
    test_health_plan.av = av_array[0]
    assert_almost_equal(test_health_plan.av,
                        av_array[0],
                        3,
                        "Av is not equal to correct value. Should be {0} is {1}".format(av_array[0],test_health_plan.av))
    assert test_health_plan.tier == av_array[1], "Tier does not match expected tier. Expected tier is {0} actual tier is {1}".format(av_array[0], test_health_plan.tier)
Exemplo n.º 2
0
def check_tier_determination(av_array):
    test_health_plan = HealthPlan()
    test_health_plan.av = av_array[0]
    assert_almost_equal(
        test_health_plan.av, av_array[0], 3,
        "Av is not equal to correct value. Should be {0} is {1}".format(
            av_array[0], test_health_plan.av))
    assert test_health_plan.tier == av_array[
        1], "Tier does not match expected tier. Expected tier is {0} actual tier is {1}".format(
            av_array[0], test_health_plan.tier)
def test_existing_av():
    test_plan = HealthPlan()
    test_plan.deductible = 500
    test_plan.coinsurance = .9
    test_plan.moop = 1000
    test_plan.av = .9065
    calc.calculate_av(test_plan)
    assert_almost_equal(
        test_plan.av, .9065, 3,
        "Av is not equal to correct value. Should be {0} is "
        "{1}".format(.9065, test_plan.av))
    assert test_plan.tier == Tier.platinum, \
        "Tier does not match expected tier. Expected tier is {0} actual tier" \
        " is {1}".format(Tier.platinum, test_plan.tier)
def test_existing_av():
    test_plan = HealthPlan()
    test_plan.deductible = 500
    test_plan.coinsurance = 0.9
    test_plan.moop = 1000
    test_plan.av = 0.9065
    calc.calculate_av(test_plan)
    assert_almost_equal(
        test_plan.av,
        0.9065,
        3,
        "Av is not equal to correct value. Should be {0} is " "{1}".format(0.9065, test_plan.av),
    )
    assert test_plan.tier == Tier.platinum, (
        "Tier does not match expected tier. Expected tier is {0} actual tier"
        " is {1}".format(Tier.platinum, test_plan.tier)
    )