Exemplo n.º 1
0
 def test_get_dict(self):
     tax_calc = self.init_class(325000, 25000, "601")
     tax_dict = tax_calc.get_dict()
     field_amount = {
         "just_value": 325000,
         "exemption_value": 25000,
         "school_taxable": 300000,
         "additional_exemption_value": 25000,
         "non_school_taxable": 275000,
         "school_millage_rate": decimal_set_places(D(0.00719700), ".00000001"),
         "school_tax_amount": decimal_set_places(D(2159.10)),
         "non_school_millage_rate": decimal_set_places(D(0.01452000), ".00000001"),
         "non_school_tax_amount": decimal_set_places(D(3993.00)),
         "total_tax_amount": decimal_set_places(D(6152.10)),
     }
     for field, amount in field_amount.iteritems():
         self.assertEqual(tax_dict[field], amount)
Exemplo n.º 2
0
 def test_get_dict(self):
     tax_calc = TaxCalculatorAssessed(225000, 179812, 25000, "201")
     tax_dict = tax_calc.get_dict()
     field_amount = {
         "just_value": 225000,
         "soh_benefit": 45188,
         "assessed_value": 179812,
         "exemption_value": 25000,
         "school_taxable": 154812,
         "additional_exemption_value": 25000,
         "non_school_taxable": 129812,
         "school_millage_rate": decimal_set_places(D(0.00719700), ".00000001"),
         "school_tax_amount": decimal_set_places(D(1114.18)),
         "non_school_millage_rate": decimal_set_places(D(0.01339810), ".00000001"),
         "non_school_tax_amount": decimal_set_places(D(1739.23)),
         "total_tax_amount": decimal_set_places(D(2853.41)),
     }
     for field, amount in field_amount.iteritems():
         self.assertEqual(tax_dict[field], amount)
Exemplo n.º 3
0
 def test_get_dict(self):
     prev_home = TaxCalculatorAssessed(256321, 125000, 25000, "402")
     tax_calc = TaxCalculatorPortability(250000, "013", prev_home)
     tax_dict = tax_calc.get_dict()
     field_amount = {
         "just_value": 250000,
         "soh_benefit": 128083,
         "assessed_value": 121917,
         "exemption_value": 25000,
         "school_taxable": 96917,
         "additional_exemption_value": 25000,
         "non_school_taxable": 71917,
         "school_millage_rate": decimal_set_places(D(0.00719700), ".00000001"),
         "school_tax_amount": decimal_set_places(D(697.51)),
         "non_school_millage_rate": decimal_set_places(D(0.01907310), ".00000001"),
         "non_school_tax_amount": decimal_set_places(D(1371.68)),
         "total_tax_amount": decimal_set_places(D(2069.19)),
     }
     for field, amount in field_amount.iteritems():
         self.assertEqual(tax_dict[field], amount)
Exemplo n.º 4
0
 def test_get_short_non_school_millage_rate(self):
     millage = Millage()
     millage.set_millage_code("100")
     self.assertEqual(millage.get_short_non_school_millage_rate(), decimal_set_places(D(0.01559450), ".00000001"))
Exemplo n.º 5
0
 def test_total_tax_amount(self):
     prev_home = TaxCalculatorAssessed(256321, 125000, 25000, "402")
     tax_calc = TaxCalculatorPortability(250000, "013", prev_home)
     self.assertEqual(decimal_set_places(D(2069.19)), tax_calc.get_total_tax_amount())
Exemplo n.º 6
0
 def test_total_tax_amount(self):
     tax_calc = TaxCalculatorAssessed(256321, 125000, 25000, "402")
     self.assertEqual(decimal_set_places(D(1744.81)), tax_calc.get_total_tax_amount())
Exemplo n.º 7
0
 def test_decimal_set_places_two_places(self):
     self.assertEqual(
         D(104.76).quantize(D(".01"), rounding=decimal.ROUND_HALF_UP), decimal_set_places(D(10.23) * D(10.24))
     )
Exemplo n.º 8
0
 def test_total_tax_amount(self):
     tax_calc = TaxCalculatorJust(125000, 25000, "604")
     self.assertEqual(decimal_set_places(D(2014.85)), tax_calc.get_total_tax_amount())
Exemplo n.º 9
0
 def test_get_total_tax_amount(self):
     tax_calc = self.init_class(75000, 0, "204")
     self.assertEqual(decimal_set_places(D(1752.87)), tax_calc.get_total_tax_amount())
Exemplo n.º 10
0
 def test_get_non_school_tax_amount(self):
     tax_calc = self.init_class(75000, 0, "204")
     self.assertEqual(decimal_set_places(D(1213.09)), tax_calc.get_non_school_tax_amount())