fix test so that we don't actually depends on file and email cubes stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 28 Sep 2010 08:36:24 +0200
branchstable
changeset 6349 14ec625b3f55
parent 6348 f5bd501628b0
child 6350 74575fb32a4d
fix test so that we don't actually depends on file and email cubes
test/data/cubes/email/entities.py
test/data/cubes/email/hooks.py
test/data/cubes/email/views/__init__.py
test/data/cubes/file/entities/__init__.py
test/data/cubes/file/hooks/__init__.py
test/data/cubes/file/views.py
test/unittest_cwconfig.py
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/data/cubes/email/entities.py	Tue Sep 28 08:36:24 2010 +0200
@@ -0,0 +1,1 @@
+"test"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/data/cubes/email/hooks.py	Tue Sep 28 08:36:24 2010 +0200
@@ -0,0 +1,1 @@
+"test"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/data/cubes/email/views/__init__.py	Tue Sep 28 08:36:24 2010 +0200
@@ -0,0 +1,1 @@
+"test"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/data/cubes/file/entities/__init__.py	Tue Sep 28 08:36:24 2010 +0200
@@ -0,0 +1,1 @@
+"test"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/data/cubes/file/hooks/__init__.py	Tue Sep 28 08:36:24 2010 +0200
@@ -0,0 +1,1 @@
+"test"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/data/cubes/file/views.py	Tue Sep 28 08:36:24 2010 +0200
@@ -0,0 +1,1 @@
+"test"
--- a/test/unittest_cwconfig.py	Fri Sep 24 13:41:13 2010 +0200
+++ b/test/unittest_cwconfig.py	Tue Sep 28 08:36:24 2010 +0200
@@ -96,13 +96,17 @@
 #         self.assertRaises(KeyError, vcconf.__getitem__, 'CRM')
 
     def test_expand_cubes(self):
+        self.config.__class__.CUBES_PATH = [CUSTOM_CUBES_DIR]
+        self.config.adjust_sys_path()
         self.assertEqual(self.config.expand_cubes(('email', 'blog')),
                           ['email', 'blog', 'file'])
 
     def test_vregistry_path(self):
+        self.config.__class__.CUBES_PATH = [CUSTOM_CUBES_DIR]
+        self.config.adjust_sys_path()
         self.assertEqual([unabsolutize(p) for p in self.config.vregistry_path()],
                           ['entities', 'web/views', 'sobjects', 'hooks',
-                           'file/entities.py', 'file/views', 'file/hooks.py',
+                           'file/entities', 'file/views.py', 'file/hooks',
                            'email/entities.py', 'email/views', 'email/hooks.py',
                            'test/data/entities.py', 'test/data/views.py'])