test/unittest_schema.py
changeset 2635 c94df21f7ab2
parent 2456 aa25d6b244c8
child 2730 bb6fcb8c5d71
--- a/test/unittest_schema.py	Sat Aug 01 16:54:03 2009 +0200
+++ b/test/unittest_schema.py	Sat Aug 01 16:54:40 2009 +0200
@@ -16,6 +16,7 @@
 from yams import BadSchemaDefinition
 from yams.constraints import SizeConstraint, StaticVocabularyConstraint
 from yams.buildobjs import RelationDefinition, EntityType, RelationType
+from yams.reader import PyFileReader
 
 from cubicweb.schema import CubicWebSchema, CubicWebEntitySchema, \
      RQLConstraint, CubicWebSchemaLoader, ERQLExpression, RRQLExpression, \
@@ -133,12 +134,6 @@
 
 class SQLSchemaReaderClassTest(TestCase):
 
-    def test_knownValues_include_schema_files(self):
-        schema_files = loader.include_schema_files('Bookmark')
-        for file in schema_files:
-            self.assert_(isabs(file))
-        self.assertListEquals([basename(f) for f in schema_files], ['Bookmark.py'])
-
     def test_knownValues_load_schema(self):
         schema = loader.load(config)
         self.assert_(isinstance(schema, CubicWebSchema))
@@ -233,7 +228,7 @@
         self.loader = CubicWebSchemaLoader()
         self.loader.defined = {}
         self.loader.loaded_files = []
-        self.loader._instantiate_handlers()
+        self.loader._pyreader = PyFileReader(self.loader)
 
     def _test(self, schemafile, msg):
         self.loader.handle_file(join(DATADIR, schemafile))