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:
3
tempest/thirdparty/boto/test.py
vendored
3
tempest/thirdparty/boto/test.py
vendored
@@ -193,11 +193,10 @@ def friendly_function_call_str(call_able, *args, **kwargs):
|
|||||||
class BotoTestCase(tempest.test.BaseTestCase):
|
class BotoTestCase(tempest.test.BaseTestCase):
|
||||||
"""Recommended to use as base class for boto related test."""
|
"""Recommended to use as base class for boto related test."""
|
||||||
|
|
||||||
conclusion = decision_maker()
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def setUpClass(cls):
|
def setUpClass(cls):
|
||||||
super(BotoTestCase, cls).setUpClass()
|
super(BotoTestCase, cls).setUpClass()
|
||||||
|
cls.conclusion = decision_maker()
|
||||||
# The trash contains cleanup functions and paramaters in tuples
|
# The trash contains cleanup functions and paramaters in tuples
|
||||||
# (function, *args, **kwargs)
|
# (function, *args, **kwargs)
|
||||||
cls._resource_trash_bin = {}
|
cls._resource_trash_bin = {}
|
||||||
|
|||||||
Reference in New Issue
Block a user