[test] Update webconfig's tests accounting for cubicweb-file being now a package 3.26
authorDenis Laxalde <denis.laxalde@logilab.fr>
Mon, 11 Jun 2018 16:50:38 +0200
branch3.26
changeset 12425 8b3f1d1f0939
parent 12424 f0a5c2fa2b5d
child 12426 9435e02be793
[test] Update webconfig's tests accounting for cubicweb-file being now a package WebconfigTC.test_locate_all_files and WebconfigTC.test_locate_resource assumed that cubicweb-file was installed in <share>/cubes/file whereas, from the latest release, it is now a standard Python package thus installed in site-packages as cubicweb_file. We simply update base directory of these two tests.
cubicweb/web/test/unittest_webconfig.py
--- a/cubicweb/web/test/unittest_webconfig.py	Wed Jun 06 18:54:24 2018 +0200
+++ b/cubicweb/web/test/unittest_webconfig.py	Mon Jun 11 16:50:38 2018 +0200
@@ -45,7 +45,7 @@
     def test_locate_resource(self):
         self.assertIn('FILE_ICON', self.config.uiprops)
         rname = self.config.uiprops['FILE_ICON'].replace(self.config.datadir_url, '')
-        self.assertIn('file', self.config.locate_resource(rname)[0].split(os.sep))
+        self.assertIn('cubicweb_file', self.config.locate_resource(rname)[0].split(os.sep))
         cubicwebcsspath = self.config.locate_resource('cubicweb.css')[0].split(os.sep)
 
         # 'shared' if tests under apycot
@@ -57,7 +57,7 @@
         wdocfiles = list(self.config.locate_all_files('toc.xml'))
         for fpath in wdocfiles:
             self.assertTrue(path.exists(fpath), fpath)
-        for expected in [path.join('cubes', 'file', 'wdoc', 'toc.xml'),
+        for expected in [path.join('cubicweb_file', 'wdoc', 'toc.xml'),
                          path.join('cubicweb', 'web', 'wdoc', 'toc.xml')]:
             for fpath in wdocfiles:
                 if fpath.endswith(expected):