TEST_SPECFILE_LOCATION = TESTDATA_SRCDIR + os.sep + 'test_spec1.spec'
def setUp(self):
+ imp.reload(counters)
self.counters = counters.Counters(self.TEST_SPECFILE_LOCATION)
def tearDown(self):
class BaseTestCounters():
def setUp(self):
+ imp.reload(counters)
self._statistics_data = {}
self.counters = counters.Counters(self.TEST_SPECFILE_LOCATION)
self._entire_server = self.counters._entire_server
class TestCounters0(unittest.TestCase, BaseTestCounters):
TEST_SPECFILE_LOCATION = None
- @classmethod
- def setUpClass(cls):
- imp.reload(counters)
def setUp(self):
BaseTestCounters.setUp(self)
def tearDown(self):
class TestCounters1(unittest.TestCase, BaseTestCounters):
TEST_SPECFILE_LOCATION = TESTDATA_SRCDIR + os.sep + 'test_spec1.spec'
- @classmethod
- def setUpClass(cls):
- imp.reload(counters)
def setUp(self):
BaseTestCounters.setUp(self)
def tearDown(self):
class TestCounters2(unittest.TestCase, BaseTestCounters):
TEST_SPECFILE_LOCATION = TESTDATA_SRCDIR + os.sep + 'test_spec2.spec'
- @classmethod
- def setUpClass(cls):
- imp.reload(counters)
def setUp(self):
BaseTestCounters.setUp(self)
def tearDown(self):
class TestDummyNotifyOut(unittest.TestCase):
"""Tests counters are incremented in which the spec file is not
loaded"""
- @classmethod
- def setUpClass(cls):
- imp.reload(counters)
-
def setUp(self):
+ imp.reload(counters)
self.notifier = DummyNotifyOut()
self.notifier.inc_counters()
class TestDummyXfroutServer(unittest.TestCase):
"""Tests counters are incremented or decremented in which the same
spec file is multiply loaded in each child class"""
- @classmethod
- def setUpClass(cls):
- imp.reload(counters)
-
def setUp(self):
+ imp.reload(counters)
self.xfrout_server = DummyXfroutServer()
self.xfrout_server.inc_counters()