restore and unittest apycot.recipe.full
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 16 Jan 2013 17:40:11 +0100
changeset 1421 00b78e701b79
parent 1420 788f69fcc2e2
child 1422 1a1f0cf913bf
restore and unittest apycot.recipe.full
migration/postcreate.py
test/test_functional.py
--- a/migration/postcreate.py	Wed Jan 16 15:00:07 2013 +0100
+++ b/migration/postcreate.py	Wed Jan 16 17:40:11 2013 +0100
@@ -14,6 +14,7 @@
 
 from cubes.apycot import recipes
 recipes.create_quick_recipe(session)
+recipes.create_full_recipe(session)
 
 if not config['pyro-server']:
     config.global_set_option('pyro-server', True)
--- a/test/test_functional.py	Wed Jan 16 15:00:07 2013 +0100
+++ b/test/test_functional.py	Wed Jan 16 17:40:11 2013 +0100
@@ -4,6 +4,8 @@
 
 import utils
 
+from cubes.apycot.recipes import full_script
+
 HERE = osp.abspath(osp.dirname(__file__))
 def setUpModule():
     subprocess.check_call(['hg', 'init', '-q', osp.join(HERE, 'data', 'project')])
@@ -22,8 +24,15 @@
         self.assertEqual(dict((checker.name, checker.status) for checker in te.checkers),
                          {'pyunit': 'nodata'})
 
-        te = self.lgc.start(self.lgce)
+
+    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)
+        tc = self.add_test_config(u'full config', env=self.lgce, group=self.pyp,
+                                  use_recipe=recipe)
+        te = tc.start(self.lgce)
         self.commit()
         self.run_plan(te)
         self.assertEqual(dict((checker.name, checker.status) for checker in te.checkers),
-                         {'pyunit': 'nodata'})
+                         {u'pycoverage': u'error', u'pylint': u'error', u'pyunit': u'nodata'})