|
@@ -1285,6 +1285,15 @@ class TestStats(unittest.TestCase):
|
|
|
"""check statistics data of 'Init'."""
|
|
|
|
|
|
stat = MyStats()
|
|
|
+ # At this point 'stat' is initialized with statistics for Stats,
|
|
|
+ # Init and Auth modules. In this test, we only need to check for Init
|
|
|
+ # statistics, while do_polling() can ask for module statistics in an
|
|
|
+ # unpredictable order (if hash randomization is enabled, which is
|
|
|
+ # the case by default for Python 3.3). To make it predictable and
|
|
|
+ # ensure the prepared answer doesn't cause disruption, we remove the
|
|
|
+ # information for the Auth module for this test.
|
|
|
+ del stat.statistics_data['Auth']
|
|
|
+
|
|
|
stat.update_modules = lambda: None
|
|
|
create_answer = isc.config.ccsession.create_answer # shortcut
|
|
|
|
|
@@ -1403,8 +1412,8 @@ class TestStats(unittest.TestCase):
|
|
|
|
|
|
class Z_TestOSEnv(unittest.TestCase):
|
|
|
# Running this test would break logging setting. To prevent it from
|
|
|
- # affecting other tests we use the same workaround as
|
|
|
- # Z_TestStatsHttpdError.
|
|
|
+ # affecting other tests we use the same workaround as Z_TestOSEnv in
|
|
|
+ # stats-httpd_test.py.
|
|
|
def test_osenv(self):
|
|
|
"""
|
|
|
test for the environ variable "B10_FROM_SOURCE"
|