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
This commit is contained in:
Matthew Treinish 2013-10-28 21:34:47 -04:00
parent 8708621799
commit f054a9c5f1

View File

@ -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 = {}