[test] update test_functionnal draft
authorDavid Douard <david.douard@logilab.fr>
Thu, 13 Nov 2014 15:17:12 +0100
changeset 1758 b1b931406fb2
parent 1757 224cd20b7284
child 1759 b9915807bddb
[test] update test_functionnal
test/test_functional.py
--- a/test/test_functional.py	Thu Nov 13 15:15:38 2014 +0100
+++ b/test/test_functional.py	Thu Nov 13 15:17:12 2014 +0100
@@ -8,13 +8,10 @@
 import cubicweb.devtools
 import cubes.apycot.testutils as utils
 
-DATA = osp.join(osp.dirname(__file__), 'data')
-os.environ['HGRCPATH'] = os.devnull
-
-class ApycotTC(utils.ApycotBaseTC):
+class ApycotNoTestTC(utils.ApycotBaseTC):
     _repo_path = (u'project',)
 
-    def test_quick_recipe(self):
+    def test_quick_recipe_no_data(self):
         with self.admin_access.client_cnx() as cnx:
             tc = cnx.find('TestConfig', name='tc_project1').one()
             pe = cnx.fond('ProjectEnviironment', name='pe_project1').one()
@@ -23,8 +20,9 @@
         self.run_plan(te)
         with self.admin_access.client_cnx() as cnx:
             te = cnx.entity_from_eid(te)
-            self.assertEqual(dict((checker.name, checker.status) for checker in te.checkers),
-                             {'pyunit': 'nodata'})
+            expected = {'pyunit': 'nodata'}
+            for checker in te.checkers:
+                self.assertEqual(expected[checker.name], checker.status, checker.log_file[0].read())
 
     def test_full_recipe(self):
         with self.admin_access.client_cnx() as cnx: