Commit 8b6ca55c authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

* drop SQL wildcard support for serialization_tag.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@19840 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0c8cc851
......@@ -42,5 +42,5 @@ WHERE
</dtml-if>
<dtml-if serialization_tag>
AND processing_node > -1
AND serialization_tag LIKE <dtml-sqlvar serialization_tag type="string">
AND serialization_tag = <dtml-sqlvar serialization_tag type="string">
</dtml-if>
......@@ -42,5 +42,5 @@ WHERE
</dtml-if>
<dtml-if serialization_tag>
AND processing_node > -1
AND serialization_tag LIKE <dtml-sqlvar serialization_tag type="string">
AND serialization_tag = <dtml-sqlvar serialization_tag type="string">
</dtml-if>
......@@ -2776,26 +2776,6 @@ class TestCMFActivity(ERP5TypeTestCase):
self.tic()
result = activity_tool.getMessageList()
self.assertEqual(len(result), 0)
# Third scenario with SQL wildcards: activate, distribute, activate, distribute
# Create first activity and distribute: it must be distributed
organisation.activate(activity=activity, serialization_tag='foo/bar/%').getTitle()
get_transaction().commit()
result = activity_tool.getMessageList()
self.assertEqual(len(result), 1)
activity_tool.distribute()
result = activity_tool.getMessageList()
self.assertEqual(len([x for x in result if x.processing_node == 0]), 1)
# Create second activity and distribute: it must *NOT* be distributed
organisation.activate(activity=activity, serialization_tag='foo/%').getTitle()
get_transaction().commit()
result = activity_tool.getMessageList()
self.assertEqual(len(result), 2)
activity_tool.distribute()
result = activity_tool.getMessageList()
self.assertEqual(len([x for x in result if x.processing_node == 0]), 1)
self.tic()
result = activity_tool.getMessageList()
self.assertEqual(len(result), 0)
# Check that giving a None value to serialization_tag does not confuse
# CMFActivity
organisation.activate(activity=activity, serialization_tag=None).getTitle()
......
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