Commit dc629e59 authored by Łukasz Nowak's avatar Łukasz Nowak

Restore Software Release Constraints.

parent 92756ee2
...@@ -28,6 +28,10 @@ ...@@ -28,6 +28,10 @@
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>VifibSoftwareReleaseConstraint</string> </value> <value> <string>VifibSoftwareReleaseConstraint</string> </value>
</item> </item>
<item>
<key> <string>last_id</string> </key>
<value> <string>8</string> </value>
</item>
<item> <item>
<key> <string>portal_type</string> </key> <key> <string>portal_type</string> </key>
<value> <string>Property Sheet</string> </value> <value> <string>Property Sheet</string> </value>
......
...@@ -6,6 +6,18 @@ ...@@ -6,6 +6,18 @@
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <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> <item>
<key> <string>constraint_base_category</string> </key> <key> <string>constraint_base_category</string> </key>
<value> <value>
...@@ -20,7 +32,9 @@ ...@@ -20,7 +32,9 @@
</item> </item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
<value> <string>There must be one and one only Software Product</string> </value> <value>
<none/>
</value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
...@@ -34,6 +48,18 @@ ...@@ -34,6 +48,18 @@
<key> <string>message_arity_not_in_range</string> </key> <key> <string>message_arity_not_in_range</string> </key>
<value> <string>One Software Product must be defined</string> </value> <value> <string>One Software Product must be defined</string> </value>
</item> </item>
<item>
<key> <string>message_arity_too_small</string> </key>
<value> <string>One Software Product must be defined</string> </value>
</item>
<item>
<key> <string>message_arity_with_portal_type_not_in_range</string> </key>
<value> <string>One Software Product must be defined</string> </value>
</item>
<item>
<key> <string>message_arity_with_portal_type_too_small</string> </key>
<value> <string>One Software Product must be defined</string> </value>
</item>
<item> <item>
<key> <string>min_arity</string> </key> <key> <string>min_arity</string> </key>
<value> <int>1</int> </value> <value> <int>1</int> </value>
...@@ -53,4 +79,34 @@ ...@@ -53,4 +79,34 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </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> </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>aggregate</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>aggregate_state_constraint</string> </value>
</item>
<item>
<key> <string>int_index</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>membership_criterion_category</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>membership_portal_type_list</string> </key>
<value> <string>python: (\'Software Product\',)</string> </value>
</item>
<item>
<key> <string>message_different_state</string> </key>
<value> <string>Software Product must be validated</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Category Membership State Constraint</string> </value>
</item>
<item>
<key> <string>string_index</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>test_method_id</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>test_tales_expression</string> </key>
<value> <string>python: object.getValidationState() != \'draft\'</string> </value>
</item>
<item>
<key> <string>workflow_state_list</string> </key>
<value> <string>python: (\'published\', \'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>
...@@ -6,6 +6,18 @@ ...@@ -6,6 +6,18 @@
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <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> <item>
<key> <string>constraint_base_category</string> </key> <key> <string>constraint_base_category</string> </key>
<value> <value>
...@@ -34,6 +46,18 @@ ...@@ -34,6 +46,18 @@
<key> <string>message_arity_not_in_range</string> </key> <key> <string>message_arity_not_in_range</string> </key>
<value> <string>One Contributor must be defined</string> </value> <value> <string>One Contributor must be defined</string> </value>
</item> </item>
<item>
<key> <string>message_arity_too_small</string> </key>
<value> <string>One Contributor must be defined</string> </value>
</item>
<item>
<key> <string>message_arity_with_portal_type_not_in_range</string> </key>
<value> <string>One Contributor must be defined</string> </value>
</item>
<item>
<key> <string>message_arity_with_portal_type_too_small</string> </key>
<value> <string>One Contributor must be defined</string> </value>
</item>
<item> <item>
<key> <string>min_arity</string> </key> <key> <string>min_arity</string> </key>
<value> <int>1</int> </value> <value> <int>1</int> </value>
...@@ -49,4 +73,34 @@ ...@@ -49,4 +73,34 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </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> </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>contributor</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>contributor_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>Contributor must be validated</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>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="String Attribute Match 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>_local_properties</string> </key>
<value>
<tuple>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>message_property_not_set</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
</tuple>
</value>
</item>
<item>
<key> <string>_range_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>constraint_property</string> </key>
<value>
<tuple>
<string>language</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>language_not_empty_constraint</string> </value>
</item>
<item>
<key> <string>message_attribute_match</string> </key>
<value> <string>Language should be defined</string> </value>
</item>
<item>
<key> <string>message_no_such_property</string> </key>
<value> <string>Language should be defined</string> </value>
</item>
<item>
<key> <string>message_property_not_set</string> </key>
<value> <string>Language should be defined</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>String Attribute Match Constraint</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>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="String Attribute Match 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>_local_properties</string> </key>
<value>
<tuple>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>message_property_not_set</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
</tuple>
</value>
</item>
<item>
<key> <string>_range_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>constraint_property</string> </key>
<value>
<tuple>
<string>reference</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>reference_not_empty_constraint</string> </value>
</item>
<item>
<key> <string>message_attribute_match</string> </key>
<value> <string>Reference must be defined</string> </value>
</item>
<item>
<key> <string>message_no_such_property</string> </key>
<value> <string>Reference must be defined</string> </value>
</item>
<item>
<key> <string>message_property_not_set</string> </key>
<value> <string>Reference must be defined</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>String Attribute Match Constraint</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>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="String Attribute Match 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>_local_properties</string> </key>
<value>
<tuple>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>message_property_not_set</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
</tuple>
</value>
</item>
<item>
<key> <string>_range_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>constraint_property</string> </key>
<value>
<tuple>
<string>url_string</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>url_not_empty_constraint</string> </value>
</item>
<item>
<key> <string>message_attribute_match</string> </key>
<value> <string>URL must be defined</string> </value>
</item>
<item>
<key> <string>message_no_such_property</string> </key>
<value> <string>URL must be defined</string> </value>
</item>
<item>
<key> <string>message_property_not_set</string> </key>
<value> <string>URL must be defined</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>String Attribute Match Constraint</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>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Attribute Unicity 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>constraint_property</string> </key>
<value>
<tuple>
<string>url_string</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>filter_parameter</string> </key>
<value> <string>python: {\'portal_type\': object.getPortalType(), \'url_string\': object.getUrlString()}</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>url_unicity_constraint</string> </value>
</item>
<item>
<key> <string>int_index</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>membership_criterion_category</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>message_invalid_attribute_unicity</string> </key>
<value> <string>URL must be unique</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Attribute Unicity Constraint</string> </value>
</item>
<item>
<key> <string>string_index</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>test_method_id</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>test_tales_expression</string> </key>
<value> <string>python: object.getUrlString("") != ""</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>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="String Attribute Match 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>_local_properties</string> </key>
<value>
<tuple>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>message_property_not_set</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
</tuple>
</value>
</item>
<item>
<key> <string>_range_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>constraint_property</string> </key>
<value>
<tuple>
<string>version</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>version_not_empty_constraint</string> </value>
</item>
<item>
<key> <string>message_attribute_match</string> </key>
<value> <string>Version should be defined</string> </value>
</item>
<item>
<key> <string>message_no_such_property</string> </key>
<value> <string>Version should be defined</string> </value>
</item>
<item>
<key> <string>message_property_not_set</string> </key>
<value> <string>Version should be defined</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>String Attribute Match Constraint</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>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Attribute Unicity 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>constraint_property</string> </key>
<value>
<tuple>
<string>version</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>filter_parameter</string> </key>
<value> <string>python: {\'portal_type\': object.getPortalType(), \'reference\': object.getReference(), \'version\': object.getVersion(), \'validation_state\': (\'submitted\', \'shared\', \'shared_alive\', \'released\', \'released_alive\', \'published\', \'published_alive\', \'archived\')}</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>version_unicity_constraint</string> </value>
</item>
<item>
<key> <string>int_index</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>membership_criterion_category</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>message_invalid_attribute_unicity</string> </key>
<value> <string>Version already exists</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Attribute Unicity Constraint</string> </value>
</item>
<item>
<key> <string>string_index</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>test_method_id</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>test_tales_expression</string> </key>
<value> <string>python: object.getVersion("") != ""</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>
...@@ -246,7 +246,7 @@ class TestVifibInternalPackingListLineConstraint(testVifibMixin): ...@@ -246,7 +246,7 @@ class TestVifibInternalPackingListLineConstraint(testVifibMixin):
portal_type='Internal Packing List') portal_type='Internal Packing List')
ipl.confirm() ipl.confirm()
line = ipl.newContent(portal_type='Internal Packing List Line') line = ipl.newContent(portal_type='Internal Packing List Line')
consistency_message = 'Property quantity must be defined' consistency_message = 'Property quantity must be defined'
self.assertTrue(consistency_message in getMessageList(line)) self.assertTrue(consistency_message in getMessageList(line))
...@@ -260,7 +260,7 @@ class TestVifibInternalPackingListLineConstraint(testVifibMixin): ...@@ -260,7 +260,7 @@ class TestVifibInternalPackingListLineConstraint(testVifibMixin):
portal_type='Internal Packing List') portal_type='Internal Packing List')
ipl.confirm() ipl.confirm()
line = ipl.newContent(portal_type='Internal Packing List Line') line = ipl.newContent(portal_type='Internal Packing List Line')
consistency_message = 'Resource must be defined' consistency_message = 'Resource must be defined'
self.assertTrue(consistency_message in getMessageList(line)) self.assertTrue(consistency_message in getMessageList(line))
...@@ -275,7 +275,7 @@ class TestVifibInternalPackingListLineConstraint(testVifibMixin): ...@@ -275,7 +275,7 @@ class TestVifibInternalPackingListLineConstraint(testVifibMixin):
portal_type='Internal Packing List') portal_type='Internal Packing List')
ipl.confirm() ipl.confirm()
line = ipl.newContent(portal_type='Internal Packing List Line') line = ipl.newContent(portal_type='Internal Packing List Line')
consistency_message = 'There should be exactly one Computer present in Items' consistency_message = 'There should be exactly one Computer present in Items'
self.assertTrue(consistency_message in getMessageList(line)) self.assertTrue(consistency_message in getMessageList(line))
...@@ -463,3 +463,148 @@ class TestVifibPurchasePackingListLineConstraint(testVifibMixin): ...@@ -463,3 +463,148 @@ class TestVifibPurchasePackingListLineConstraint(testVifibMixin):
line.setQuantity(1.0) line.setQuantity(1.0)
self.assertFalse(consistency_message in getMessageList(line)) self.assertFalse(consistency_message in getMessageList(line))
class TestVifibSoftwareReleaseConstraint(testVifibMixin):
def test_aggregate(self):
consistency_message_existence = 'One Software Product must be defined'
consistency_message_state = 'Software Product must be validated'
software_release = self.portal.software_release_module.newContent(
portal_type='Software Release')
software_release.publish()
self.assertTrue(consistency_message_existence in getMessageList(
software_release))
software_product = self.portal.software_product_module.newContent(
portal_type='Software Product')
software_release.setAggregate(software_product.getRelativeUrl())
self.assertFalse(consistency_message_existence in getMessageList(
software_release))
software_product_2 = self.portal.software_product_module.newContent(
portal_type='Software Product')
software_release.setAggregateList([software_product.getRelativeUrl(),
software_product_2.getRelativeUrl()])
self.assertTrue(consistency_message_existence in getMessageList(
software_release))
software_release.setAggregate(software_product.getRelativeUrl())
self.assertTrue(consistency_message_state in getMessageList(
software_release))
software_product.validate()
self.assertFalse(consistency_message_state in getMessageList(
software_release))
def test_contributor(self):
consistency_message_existence = 'One Contributor must be defined'
consistency_message_state = 'Contributor must be validated'
software_release = self.portal.software_release_module.newContent(
portal_type='Software Release')
self.assertTrue(consistency_message_existence in getMessageList(
software_release))
person = self.portal.person_module.newContent(
portal_type='Person')
#XXX: Conflict: contributor is category and dublin core property
#software_release.setContributor(person.getRelativeUrl())
software_release.setContributorValue(person)
self.assertFalse(consistency_message_existence in getMessageList(
software_release))
person_2 = self.portal.person_module.newContent(
portal_type='Person')
#XXX: Conflict: contributor is category and dublin core property
#software_release.setContributorList([person.getRelativeUrl(),
# person_2.getRelativeUrl()])
software_release.setContributorValueList([person, person_2])
self.assertTrue(consistency_message_existence in getMessageList(
software_release))
#XXX: Conflict: contributor is category and dublin core property
#software_release.setContributor(person.getRelativeUrl())
software_release.setContributorValue(person)
self.assertTrue(consistency_message_state in getMessageList(
software_release))
person.validate()
self.assertFalse(consistency_message_state in getMessageList(
software_release))
def test_reference(self):
consistency_message = 'Reference must be defined'
software_release = self.portal.software_release_module.newContent(
portal_type='Software Release')
self.assertTrue(consistency_message in getMessageList(software_release))
software_release.setReference(rndstr())
self.assertFalse(consistency_message in getMessageList(software_release))
def test_language(self):
consistency_message = 'Language should be defined'
software_release = self.portal.software_release_module.newContent(
portal_type='Software Release')
self.assertTrue(consistency_message in getMessageList(software_release))
software_release.setLanguage(rndstr())
self.assertFalse(consistency_message in getMessageList(software_release))
def test_version(self):
consistency_message_existence = 'Version should be defined'
consistency_message_unicity = 'Version already exists'
reference = rndstr()
software_release = self.portal.software_release_module.newContent(
portal_type='Software Release', reference=reference)
self.assertTrue(consistency_message_existence in getMessageList(
software_release))
version = rndstr()
software_release.setVersion(version)
self.assertFalse(consistency_message_existence in getMessageList(
software_release))
software_release_2 = self.portal.software_release_module.newContent(
portal_type='Software Release', version=version, reference=reference)
software_release.publish()
software_release_2.publish()
self.stepTic()
self.assertTrue(consistency_message_unicity in getMessageList(
software_release))
self.assertTrue(consistency_message_unicity in getMessageList(
software_release_2))
software_release_2.setVersion(rndstr())
self.stepTic()
self.assertFalse(consistency_message_unicity in getMessageList(
software_release))
self.assertFalse(consistency_message_unicity in getMessageList(
software_release_2))
200 201
\ No newline at end of file \ 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