server/test/unittest_schemaserial.py
changeset 9299 c5eed908117d
parent 9141 492216093bc3
child 9395 96dba2efd16d
--- a/server/test/unittest_schemaserial.py	Thu Oct 17 11:34:03 2013 +0200
+++ b/server/test/unittest_schemaserial.py	Fri Aug 23 15:06:27 2013 +0200
@@ -22,6 +22,7 @@
 
 from logilab.common.testlib import TestCase, unittest_main
 
+from cubicweb import Binary
 from cubicweb.schema import CubicWebSchemaLoader
 from cubicweb.devtools import TestServerConfiguration
 
@@ -188,7 +189,6 @@
         self.assertIn('extra_props', got[1][1])
         # this extr
         extra_props = got[1][1]['extra_props']
-        from cubicweb import Binary
         self.assertIsInstance(extra_props, Binary)
         got[1][1]['extra_props'] = got[1][1]['extra_props'].getvalue()
         self.assertListEqual(expected, got)
@@ -197,7 +197,8 @@
         self.assertListEqual([
             ('INSERT CWAttribute X: X cardinality %(cardinality)s,X defaultval %(defaultval)s,X description %(description)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',
              {'se': None, 'rt': None, 'oe': None,
-              'description': u'', 'internationalizable': True, 'fulltextindexed': False, 'ordernum': 3, 'defaultval': u'text/plain', 'indexed': False, 'cardinality': u'?1'}),
+              'description': u'', 'internationalizable': True, 'fulltextindexed': False,
+              'ordernum': 3, 'defaultval': Binary('text/plain'), 'indexed': False, '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',
              {'x': None, 'value': u'None', 'ct': 'FormatConstraint_eid'}),
             ('INSERT CWConstraint X: X value %(value)s, X cstrtype CT, EDEF constrained_by X WHERE CT eid %(ct)s, EDEF eid %(x)s',