def test_group_9(self): assert assignment.assign_expense_coefficient("011010") == (0.67, 9) assert assignment.assign_expense_coefficient("061010") == (0.67, 9) assert assignment.assign_expense_coefficient("201010") == (0.67, 9) assert assignment.assign_expense_coefficient("351010") == (0.67, 9) assert assignment.assign_expense_coefficient("371010") == (0.67, 9) assert assignment.assign_expense_coefficient("491010") == (0.67, 9) assert assignment.assign_expense_coefficient("999999") == (0.67, 9)
def tax_calculator(income: float, years_of_activity: int, activity_code: str, paid_contributions: float, tax_prepayment: float): """Returns the tax amount to be paid""" tax_percentage = assign_tax_percentage(years_of_activity) ateco_code_clean = assignment.clean_input(activity_code) expense_coefficient = assignment.assign_expense_coefficient( ateco_code_clean)[0] gross_taxable_income = calculate_gross_taxable_income( income, expense_coefficient) net_taxable_income = calculate_net_taxable_income(gross_taxable_income, paid_contributions) tax_to_be_paid = calculate_net_tax(net_taxable_income, tax_percentage, tax_prepayment) return tax_to_be_paid
def test_group_8(self): assert assignment.assign_expense_coefficient("651010") == (0.78, 8) assert assignment.assign_expense_coefficient("720101") == (0.78, 8) assert assignment.assign_expense_coefficient("850000") == (0.78, 8) assert assignment.assign_expense_coefficient("880000") == (0.78, 8)
def test_group_6(self): assert assignment.assign_expense_coefficient("4611") == (0.62, 6) assert assignment.assign_expense_coefficient("46189") == (0.62, 6)
def test_group_7(self): assert assignment.assign_expense_coefficient("551010") == (0.4, 7) assert assignment.assign_expense_coefficient("561011") == (0.4, 7)
def test_group_5(self): assert assignment.assign_expense_coefficient("410000") == (0.86, 5) assert assignment.assign_expense_coefficient("421010") == (0.86, 5) assert assignment.assign_expense_coefficient("431010") == (0.86, 5) assert assignment.assign_expense_coefficient("680000") == (0.86, 5)
def test_group_4(self): assert assignment.assign_expense_coefficient("4782") == (0.4, 4) assert assignment.assign_expense_coefficient("4789") == (0.4, 4)
def test_group_3(self): assert assignment.assign_expense_coefficient("4781") == (0.4, 3)
def test_group_2(self): assert assignment.assign_expense_coefficient("462310") == (0.40, 2) assert assignment.assign_expense_coefficient("473510") == (0.40, 2) assert assignment.assign_expense_coefficient("479100") == (0.40, 2) assert assignment.assign_expense_coefficient("4510101") == (0.40, 2)
def test_group_1(self): assert assignment.assign_expense_coefficient("101111") == (0.40, 1) assert assignment.assign_expense_coefficient("111011") == (0.40, 1)