Commit b5693986 by Rafael Monnerat Committed by Alain Takoudjou

slapos_subscription_request: round values to avoid float points imprecision

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