cubicweb/test/unittest_schema.py
changeset 11916 f0bc9ca93e21
parent 11911 37726f66ff82
child 12539 10159a3d1d72
--- a/cubicweb/test/unittest_schema.py	Tue May 12 22:14:24 2015 +0200
+++ b/cubicweb/test/unittest_schema.py	Fri Jan 20 09:55:08 2017 +0100
@@ -17,7 +17,7 @@
 # with CubicWeb.  If not, see <http://www.gnu.org/licenses/>.
 """unit tests for module cubicweb.schema"""
 
-from os.path import join, dirname
+from os.path import join, dirname, splitext
 
 from logilab.common.testlib import TestCase, unittest_main
 
@@ -402,7 +402,8 @@
         self.loader.post_build_callbacks = []
 
     def _test(self, schemafile, msg):
-        self.loader.handle_file(join(DATADIR, schemafile), None)
+        self.loader.handle_file(join(DATADIR, schemafile),
+                                splitext(schemafile)[0])
         sch = self.loader.schemacls('toto')
         with self.assertRaises(BadSchemaDefinition) as cm:
             fill_schema(sch, self.loader.defined, False)