[test] fix test_functionnal.py
Bot had no proper cw source configuration.
--- a/test/test_functional.py Thu May 15 08:58:58 2014 +0200
+++ b/test/test_functional.py Thu May 22 22:57:07 2014 +0200
@@ -9,6 +9,10 @@
from cubes.apycot.recipes import full_script
HERE = osp.abspath(osp.dirname(__file__))
+
+import narvalbot
+narvalbot._CW_SOURCES_FILE = osp.join(HERE, 'data', 'narval-cw-sources.ini')
+
def setUpModule():
ppath = osp.join(HERE, 'data', 'project')
if osp.isdir(osp.join(ppath, '.hg')):
@@ -18,7 +22,6 @@
subprocess.check_call(['hg', 'commit', '-q', '-R', ppath, '-m', 'ze rev'])
subprocess.check_call(['hg', 'phase', '-p', '.', '-q', '-R', ppath])
-
def tearDownModule():
shutil.rmtree(osp.join(HERE, 'data', 'project', '.hg'))
@@ -35,7 +38,7 @@
def test_full_recipe(self):
recipe = self.req.execute('Recipe X WHERE X name "apycot.recipe.full"').get_entity(0, 0)
# reset recipe content
- recipe.set_attributes(script=full_script)
+ recipe.cw_set(script=full_script)
tc = self.add_test_config(u'full config', env=self.lgce, group=self.pyp,
use_recipe=recipe)
te = tc.start(self.lgce)
--- a/testutils.py Thu May 15 08:58:58 2014 +0200
+++ b/testutils.py Thu May 22 22:57:07 2014 +0200
@@ -167,7 +167,7 @@
# reset vcsrepo (using the session )
init_vcsrepo(self.repo)
# reset recipe content
- self.recipe.set_attributes(script=self.recipescript)
+ self.recipe.cw_set(script=self.recipescript)
self.lgc = self.add_test_config(u'lgc', env=self.lgce, group=self.pyp, use_recipe=self.recipe)
self.repo.threaded_task = lambda func: func() # XXX move to cw