Commit 781f889e authored by Romain Courteaud's avatar Romain Courteaud

slapos_accounting: drop usage of createZODBScript

parent 37911fbc
......@@ -1166,28 +1166,11 @@ class TestSlapOSReindexOpenSaleOrder(SlapOSTestCaseMixin):
time.sleep(1)
open_order_line = open_order.newContent(portal_type="Open Sale Order Line")
self.tic()
script_name = "OpenSaleOrder_reindexIfIndexedBeforeLine"
alarm = self.portal.portal_alarms.slapos_reindex_open_sale_order
order = self.portal.portal_catalog(
uid=open_order.getUid(),
select_dict={'indexation_timestamp': None})[0]
line = self.portal.portal_catalog(
uid=open_order_line.getUid(),
select_dict={'indexation_timestamp': None})[0]
self.assertTrue(order.indexation_timestamp < line.indexation_timestamp)
self.portal.portal_alarms.slapos_reindex_open_sale_order.activeSense()
self.tic()
order = self.portal.portal_catalog(
uid=open_order.getUid(),
select_dict={'indexation_timestamp': None})[0]
line = self.portal.portal_catalog(
uid=open_order_line.getUid(),
select_dict={'indexation_timestamp': None})[0]
self.assertTrue(order.indexation_timestamp > line.indexation_timestamp,
"%s %s" % (order.indexation_timestamp, line.indexation_timestamp))
self._test_alarm(
alarm, open_order, script_name)
def test_alarm_no_line(self):
open_order = self.createOpenOrder()
......
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