From f054a9c5f103a0e30e66f69c8f7872097feb3af3 Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Mon, 28 Oct 2013 21:34:47 -0400 Subject: [PATCH] Move decision_maker() call into setUpClass Previously the class level call of decision_maker() to detect certain configuration details for the boto tests was mad in the class definition. This has issues with unit testing because it requires a functional config at import time for the file. This commit avoids this restriction by moving this call into setUpClass for BotoTestCase which won't try to execute decision_maker() at import. Change-Id: I8abf4ae109576499fed6b31ae644c1bac58e3350 --- tempest/thirdparty/boto/test.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tempest/thirdparty/boto/test.py b/tempest/thirdparty/boto/test.py index 5295e447bd..5ae21c8951 100644 --- a/tempest/thirdparty/boto/test.py +++ b/tempest/thirdparty/boto/test.py @@ -193,11 +193,10 @@ def friendly_function_call_str(call_able, *args, **kwargs): class BotoTestCase(tempest.test.BaseTestCase): """Recommended to use as base class for boto related test.""" - conclusion = decision_maker() - @classmethod def setUpClass(cls): super(BotoTestCase, cls).setUpClass() + cls.conclusion = decision_maker() # The trash contains cleanup functions and paramaters in tuples # (function, *args, **kwargs) cls._resource_trash_bin = {}