[IMP] sale_mrp: increase test delta

The test was comparing a scheduled date was correctly computed.
The runbot build 363053 failed because runbot12 is a bit slower and computed
the delay in 2 seconds instead of the 1 previously tolerated.

Increase the delta to 10 seconds.

The delay is a matter of days. Having a difference of 1, 10 or even 100 seconds
should be equivalent functionnaly.

Having a 100 seconds delay could indicate a serious performance issue though...
This commit is contained in:
Martin Trigaux
2018-08-20 10:28:33 +02:00
parent c25b88bd4e
commit b4e00018d6
@@ -116,7 +116,7 @@ class TestSaleMrpLeadTime(TestStockCommon):
out_date = fields.Datetime.from_string(order.date_order) + timedelta(days=self.product_1.sale_delay) - timedelta(days=out.move_lines[0].rule_id.delay)
self.assertAlmostEqual(
out_min_date, out_date,
delta=timedelta(seconds=1),
delta=timedelta(seconds=10),
msg='Schedule date of ship type picking should be equal to: order date + Customer Lead Time - pull rule delay.'
)
@@ -126,7 +126,7 @@ class TestSaleMrpLeadTime(TestStockCommon):
pack_date = out_date - timedelta(days=pack.move_lines[0].rule_id.delay)
self.assertAlmostEqual(
pack_min_date, pack_date,
delta=timedelta(seconds=1),
delta=timedelta(seconds=10),
msg='Schedule date of pack type picking should be equal to: Schedule date of ship type picking - pull rule delay.'
)
@@ -135,7 +135,7 @@ class TestSaleMrpLeadTime(TestStockCommon):
pick_min_date = fields.Datetime.from_string(pick.scheduled_date)
self.assertAlmostEqual(
pick_min_date, pack_date,
delta=timedelta(seconds=1),
delta=timedelta(seconds=10),
msg='Schedule date of pick type picking should be equal to: Schedule date of pack type picking.'
)
@@ -144,6 +144,6 @@ class TestSaleMrpLeadTime(TestStockCommon):
date_planned_start = fields.Datetime.from_string(manufacturing_order.date_planned_start)
self.assertAlmostEqual(
date_planned_start, mo_date,
delta=timedelta(seconds=1),
delta=timedelta(seconds=10),
msg="Schedule date of manufacturing order should be equal to: Schedule date of pack type picking - product's Manufacturing Lead Time."
)