Skip to content

Commit

Permalink
[16.0][FIX] tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mourad-ehm committed Feb 20, 2024
1 parent 12e56a4 commit 61ffbf0
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions l10n_fr_ecotaxe_sale/tests/test_sale_ecotaxe.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ def setUpClass(cls, chart_template_ref="l10n_fr.l10n_fr_pcg_chart_template"):
"name": "Fixed Ecotaxe",
"ecotaxe_type": "fixed",
"default_fixed_ecotaxe": 2.4,
"ecotaxe_product_status": "M",
"ecotaxe_supplier_status": "FAB",
"product_status": "M",
"supplier_status": "FAB",
}
)
cls.ecotaxe_classification2 = cls.ecotaxe_classification.create(
{
"name": "Weight based",
"ecotaxe_type": "weight_based",
"ecotaxe_coef": 0.04,
"ecotaxe_product_status": "P",
"ecotaxe_supplier_status": "FAB",
"product_status": "P",
"supplier_status": "FAB",
}
)
cls.product_a.weight = 100
Expand Down Expand Up @@ -91,7 +91,7 @@ def test_01_manual_fixed_ecotaxe(self):
self.assertEqual(self.product_a.ecotaxe_amount, 1.5)
self.sale_line1.product_uom_qty = 4
self.sale_line1._onchange_product_ecotaxe_line()
self.assertEqual(self.sale_line1.amount_unit, 1.5)
self.assertEqual(self.sale_line1.ecotaxe_amount_unit, 1.5)
self.assertEqual(self.sale_line1.subtotal_ecotaxe, 6.0)
self.assertEqual(self.sale.amount_total, 4800.0)
self.assertEqual(self.sale.amount_ecotaxe, 6.0)
Expand All @@ -113,7 +113,7 @@ def test_02_classification_weight_based_ecotaxe(self):
self.sale_line1._compute_ecotaxe()
self.assertEqual(self.product_b.ecotaxe_amount, 16)
self.sale_line1.product_uom_qty = 3
self.assertEqual(self.sale_line1.amount_unit, 16)
self.assertEqual(self.sale_line1.ecotaxe_amount_unit, 16)
self.assertEqual(self.sale_line1.subtotal_ecotaxe, 48)
self.assertEqual(self.sale.amount_total, 720.0)
self.assertEqual(self.sale.amount_ecotaxe, 48)
Expand Down Expand Up @@ -145,7 +145,7 @@ def test_03_classification_ecotaxe(self):
self.assertEqual(self.product_a.ecotaxe_amount, 2.4)
self.sale_line1.product_uom_qty = 3
self.sale_line1._onchange_product_ecotaxe_line()
self.assertEqual(self.sale_line1.amount_unit, 2.4)
self.assertEqual(self.sale_line1.ecotaxe_amount_unit, 2.4)
self.assertAlmostEqual(self.sale_line1.subtotal_ecotaxe, 7.2)
self.sale_line2._onchange_product_ecotaxe_line()
self.assertEqual(self.sale_line2.ecotaxe_amount_unit, 16)
Expand Down

0 comments on commit 61ffbf0

Please sign in to comment.