server/test/unittest_schemaserial.py
changeset 9965 a8769b752299
parent 9956 19a683a0047c
child 9968 50f046bf0e50
--- 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',