server/test/unittest_repository.py
changeset 8947 3bbd416b09ec
parent 8945 ba9e3fbfa5a5
child 8999 81a5d57d9230
--- a/server/test/unittest_repository.py	Wed Apr 24 14:49:49 2013 +0200
+++ b/server/test/unittest_repository.py	Fri Apr 26 18:06:44 2013 +0200
@@ -571,13 +571,17 @@
         helper.TYPE_CONVERTERS.pop('BabarTestType', None)
         super(SchemaDeserialTC, cls).tearDownClass()
 
-    def test_fill_schema(self):
+    def test_deserialization_base(self):
+        """Check the following deserialization
+
+        * all CWEtype has name
+        * Final type
+        * CWUniqueTogetherConstraint
+        * _unique_together__ content"""
         origshema = self.repo.schema
         try:
-            self.repo.schema = CubicWebSchema(self.repo.config.appid)
-            self.repo.config._cubes = None # avoid assertion error
             self.repo.config.repairing = True # avoid versions checking
-            self.repo.fill_schema()
+            self.repo.set_schema(self.repo.deserialize_schema())
             table = SQL_PREFIX + 'CWEType'
             namecol = SQL_PREFIX + 'name'
             finalcol = SQL_PREFIX + 'final'
@@ -617,10 +621,8 @@
     def test_custom_attribute_param(self):
         origshema = self.repo.schema
         try:
-            self.repo.schema = CubicWebSchema(self.repo.config.appid)
-            self.repo.config._cubes = None # avoid assertion error
             self.repo.config.repairing = True # avoid versions checking
-            self.repo.fill_schema()
+            self.repo.set_schema(self.repo.deserialize_schema())
             pes = self.repo.schema['Personne']
             attr = pes.rdef('custom_field_of_jungle')
             self.assertIn('jungle_speed', vars(attr))