cloudstack/tools/testClient/cloudstackTestCase.py
Prasanna Santhanam 52202839fb testCase level logger and testClient class attr
reviewed-by: Chirag Jog

Each testCase class will use its own logger to distinguish log
messages when multiple suites are run. This will aid debugging

Every cloudstackTestCase will also contiain a class level attr of the
testClient which was previously available only to setUp/tearDown. Now
even setUpClass/tearDownClass can use this attribute.
2012-03-24 08:46:50 +05:30

18 lines
457 B
Python

from cloudstackAPI import *
try:
import unittest2 as unittest
except ImportError:
import unittest
import cloudstackTestClient
class cloudstackTestCase(unittest.case.TestCase):
clstestclient = None
def __init__(self, args):
unittest.case.TestCase.__init__(self, args)
self.testClient = cloudstackTestClient.cloudstackTestClient()
@classmethod
def getClsTestClient(cls):
return cls.clstestclient