--- a/server/test/unittest_schemaserial.py Thu Aug 28 07:44:29 2014 +0200
+++ b/server/test/unittest_schemaserial.py Mon Jun 16 10:08:32 2014 +0200
@@ -222,7 +222,7 @@
'inlined': False}),
('INSERT CWAttribute X: X cardinality %(cardinality)s,X defaultval %(defaultval)s,'
- 'X description %(description)s,X fulltextindexed %(fulltextindexed)s,'
+ 'X description %(description)s,X formula %(formula)s,X fulltextindexed %(fulltextindexed)s,'
'X indexed %(indexed)s,X internationalizable %(internationalizable)s,'
'X ordernum %(ordernum)s,X relation_type ER,X from_entity SE,'
'X to_entity OE WHERE SE eid %(se)s,ER eid %(rt)s,OE eid %(oe)s',
@@ -235,6 +235,7 @@
'ordernum': 5,
'defaultval': None,
'indexed': False,
+ 'formula': None,
'cardinality': u'?1'}),
('INSERT CWConstraint X: X value %(value)s, X cstrtype CT, EDEF constrained_by X '
'WHERE CT eid %(ct)s, EDEF eid %(x)s',
@@ -248,7 +249,7 @@
'value': u"u'?1', u'11'"}),
('INSERT CWAttribute X: X cardinality %(cardinality)s,X defaultval %(defaultval)s,'
- 'X description %(description)s,X fulltextindexed %(fulltextindexed)s,'
+ 'X description %(description)s,X formula %(formula)s,X fulltextindexed %(fulltextindexed)s,'
'X indexed %(indexed)s,X internationalizable %(internationalizable)s,'
'X ordernum %(ordernum)s,X relation_type ER,X from_entity SE,X to_entity OE '
'WHERE SE eid %(se)s,ER eid %(rt)s,OE eid %(oe)s',
@@ -261,6 +262,7 @@
'ordernum': 5,
'defaultval': None,
'indexed': False,
+ 'formula': None,
'cardinality': u'?1'}),
('INSERT CWConstraint X: X value %(value)s, X cstrtype CT, EDEF constrained_by X '
'WHERE CT eid %(ct)s, EDEF eid %(x)s',
@@ -273,7 +275,7 @@
'ct': u'StaticVocabularyConstraint_eid',
'value': (u"u'?*', u'1*', u'+*', u'**', u'?+', u'1+', u'++', u'*+', u'?1', "
"u'11', u'+1', u'*1', u'??', u'1?', u'+?', u'*?'")})],
- list(rschema2rql(schema.rschema('cardinality'), cstrtypemap)))
+ list(rschema2rql(schema.rschema('cardinality'), cstrtypemap)))
def test_rschema2rql_custom_type(self):
expected = [('INSERT CWRType X: X description %(description)s,X final %(final)s,'
@@ -287,13 +289,14 @@
'symmetric': False}),
('INSERT CWAttribute X: X cardinality %(cardinality)s,'
'X defaultval %(defaultval)s,X description %(description)s,'
- 'X extra_props %(extra_props)s,X indexed %(indexed)s,'
+ 'X extra_props %(extra_props)s,X formula %(formula)s,X indexed %(indexed)s,'
'X ordernum %(ordernum)s,X relation_type ER,X from_entity SE,'
'X to_entity OE WHERE SE eid %(se)s,ER eid %(rt)s,OE eid %(oe)s',
{'cardinality': u'?1',
'defaultval': None,
'description': u'',
'extra_props': '{"jungle_speed": 42}',
+ 'formula': None,
'indexed': False,
'oe': None,
'ordernum': 4,
@@ -313,7 +316,7 @@
def test_rdef2rql(self):
self.assertListEqual([
('INSERT CWAttribute X: X cardinality %(cardinality)s,X defaultval %(defaultval)s,'
- 'X description %(description)s,X fulltextindexed %(fulltextindexed)s,'
+ 'X description %(description)s,X formula %(formula)s,X fulltextindexed %(fulltextindexed)s,'
'X indexed %(indexed)s,X internationalizable %(internationalizable)s,'
'X ordernum %(ordernum)s,X relation_type ER,X from_entity SE,'
'X to_entity OE WHERE SE eid %(se)s,ER eid %(rt)s,OE eid %(oe)s',
@@ -326,6 +329,7 @@
'ordernum': 3,
'defaultval': Binary('text/plain'),
'indexed': False,
+ 'formula': None,
'cardinality': u'?1'}),
('INSERT CWConstraint X: X value %(value)s, X cstrtype CT, EDEF constrained_by X '
'WHERE CT eid %(ct)s, EDEF eid %(x)s',
--- a/test/unittest_schema.py Thu Aug 28 07:44:29 2014 +0200
+++ b/test/unittest_schema.py Mon Jun 16 10:08:32 2014 +0200
@@ -193,7 +193,7 @@
'ecrit_par', 'eid', 'end_timestamp', 'evaluee', 'expression', 'exprtype', 'extra_props',
- 'fabrique_par', 'final', 'firstname', 'for_user', 'fournit',
+ 'fabrique_par', 'final', 'firstname', 'for_user', 'formula', 'fournit',
'from_entity', 'from_state', 'fulltext_container', 'fulltextindexed',
'has_group_permission', 'has_text',