Commit 7f6df83e authored by Łukasz Nowak's avatar Łukasz Nowak

Restored Assignment constraint.

parent 642a0e17
......@@ -6,10 +6,32 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_count</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_mt_index</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>_tree</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>VifibAssignmentConstraint</string> </value>
</item>
<item>
<key> <string>last_id</string> </key>
<value> <string>1</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Property Sheet</string> </value>
......@@ -17,4 +39,26 @@
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Length" module="BTrees.Length"/>
</pickle>
<pickle> <int>0</int> </pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Category Membership State Constraint" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_identity_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_range_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>base_category</string> </key>
<value> <string>parent</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>person_state_constraint</string> </value>
</item>
<item>
<key> <string>membership_portal_type_list</string> </key>
<value> <string>python: (\'Person\',)</string> </value>
</item>
<item>
<key> <string>message_different_state</string> </key>
<value> <string>The person document has to be validated to start assignment</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Category Membership State Constraint</string> </value>
</item>
<item>
<key> <string>workflow_state_list</string> </key>
<value> <string>python: \'validated\'</string> </value>
</item>
<item>
<key> <string>workflow_variable</string> </key>
<value> <string>validation_state</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -36,7 +36,7 @@ def getMessageList(o):
class TestVifibSoftwareProductConstraint(testVifibMixin):
def getTitle(self):
return "Vifib Constraint checks"
return "Vifib Software Product Constraint checks"
def test_title_not_empty(self):
software_product = self.portal.software_product_module.newContent(
......@@ -68,3 +68,19 @@ class TestVifibSoftwareProductConstraint(testVifibMixin):
self.assertFalse(consistency_message in getMessageList(software_product))
self.assertFalse(consistency_message in getMessageList(software_product_2))
class TestVifibAssignmentConstraint(testVifibMixin):
def getTitle(self):
return "Vifib Assignment Constraint checks"
def test_parent_person_validated(self):
person = self.portal.person_module.newContent(portal_type='Person')
assignment = person.newContent(portal_type='Assignment')
consistency_message = 'The person document has to be validated to start '\
'assignment'
self.assertTrue(consistency_message in getMessageList(assignment))
person.validate()
self.assertFalse(consistency_message in getMessageList(assignment))
190
\ No newline at end of file
191
\ No newline at end of file
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