test/unittest_cwconfig.py
branchstable
changeset 6314 b233cc448bdd
parent 5426 0d4853a6e5ee
child 6340 470d8e828fda
--- a/test/unittest_cwconfig.py	Wed Sep 22 20:12:38 2010 +0200
+++ b/test/unittest_cwconfig.py	Thu Sep 23 10:46:38 2010 +0200
@@ -15,9 +15,8 @@
 #
 # You should have received a copy of the GNU Lesser General Public License along
 # with CubicWeb.  If not, see <http://www.gnu.org/licenses/>.
-"""
+"""cubicweb.cwconfig unit tests"""
 
-"""
 import sys
 import os
 import tempfile
@@ -51,7 +50,9 @@
         ApptestConfiguration.CUBES_PATH = []
 
     def test_reorder_cubes(self):
-        # jpl depends on email and file and comment
+        self.config.__class__.CUBES_PATH = [CUSTOM_CUBES_DIR]
+        self.config.adjust_sys_path()
+        # forge depends on email and file and comment
         # email depends on file
         self.assertEquals(self.config.reorder_cubes(['file', 'email', 'forge']),
                           ('forge', 'email', 'file'))
@@ -67,6 +68,8 @@
                           ('forge', 'email', 'file'))
 
     def test_reorder_cubes_recommends(self):
+        self.config.__class__.CUBES_PATH = [CUSTOM_CUBES_DIR]
+        self.config.adjust_sys_path()
         from cubes.comment import __pkginfo__ as comment_pkginfo
         comment_pkginfo.__recommends_cubes__ = {'file': None}
         try:
@@ -130,6 +133,7 @@
         from cubes import file
         self.assertEquals(file.__path__, [join(CUSTOM_CUBES_DIR, 'file')])
 
+
 class FindPrefixTC(TestCase):
     def make_dirs(self, *args):
         path = join(tempfile.tempdir, *args)