From: Thomas Herve Date: Thu, 2 May 2013 19:50:01 +0000 (+0200) Subject: Depend on discover to fix python2.6 tests X-Git-Tag: 2014.1~656^2 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=334df9fc21dd3e3fc3c8aee2f9c2ad128c9f98ce;p=openstack-build%2Fheat-build.git Depend on discover to fix python2.6 tests It also fix a failure introduced by using 2.7-specific setUpClass. Fixes: bug #1175753 Change-Id: I63ba61050602df92c654bd70519947965494df37 --- diff --git a/heat/tests/test_watch.py b/heat/tests/test_watch.py index d8dd0d7c..12e1214e 100644 --- a/heat/tests/test_watch.py +++ b/heat/tests/test_watch.py @@ -37,9 +37,12 @@ class DummyAction: class WatchRuleTest(HeatTestCase): + stack_id = None @classmethod - def setUpClass(cls): + def setUpDatabase(cls): + if cls.stack_id is not None: + return # Create a dummy stack in the DB as WatchRule instances # must be associated with a stack utils.setup_dummy_db() @@ -58,6 +61,7 @@ class WatchRuleTest(HeatTestCase): def setUp(self): super(WatchRuleTest, self).setUp() + self.setUpDatabase() self.username = 'watchrule_test_user' self.ctx = context.get_admin_context() diff --git a/tools/test-requires b/tools/test-requires index 14eba7c2..d5b09feb 100644 --- a/tools/test-requires +++ b/tools/test-requires @@ -2,6 +2,7 @@ distribute>=0.6.24 coverage +discover mox==0.5.3 testrepository>=0.0.13 paramiko