Commit b5693986 authored by Rafael Monnerat's avatar Rafael Monnerat Committed by Alain Takoudjou

slapos_subscription_request: round values to avoid float points imprecision

parent c1ea6cea
...@@ -321,8 +321,8 @@ class TestSlapOSTrialScenario(DefaultScenarioMixin): ...@@ -321,8 +321,8 @@ class TestSlapOSTrialScenario(DefaultScenarioMixin):
quantity = subscription_request.getQuantity() quantity = subscription_request.getQuantity()
# The values are without tax # The values are without tax
self.assertEqual(sale_packing_list_line.getQuantity(), 1) self.assertEqual(sale_packing_list_line.getQuantity(), 1)
self.assertEqual(sale_packing_list_line.getPrice(), -25*quantity) self.assertEqual(round(sale_packing_list_line.getPrice(), 2), -25*quantity)
self.assertEqual(sale_packing_list_line.getTotalPrice(), -25*quantity) self.assertEqual(round(sale_packing_list_line.getTotalPrice(), 2), -25*quantity)
self.assertEqual(sale_packing_list.getCausality(), self.assertEqual(sale_packing_list.getCausality(),
subscription_request.getRelativeUrl()) subscription_request.getRelativeUrl())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment