Browse Source

[2225_statistics] rename to clear_all()

It's due to the review comment.
Naoki Kambe 12 years ago
parent
commit
607d55c17a

+ 1 - 1
src/lib/python/isc/statistics/counter.py

@@ -270,7 +270,7 @@ class Counters():
                     self._statistics._spec, self._perzone_prefix)\
                     ['named_set_item_spec']['map_item_spec'])
 
-    def clear_counters(self):
+    def clear_all(self):
         """clears all statistics data"""
         with self._rlock:
             self._statistics._data = {}

+ 3 - 3
src/lib/python/isc/statistics/tests/counter_test.py

@@ -53,14 +53,14 @@ class TestBasicMethods(unittest.TestCase):
         self.counters = counter.Counters(self.TEST_SPECFILE_LOCATION)
 
     def tearDown(self):
-        self.counters.clear_counters()
+        self.counters.clear_all()
 
     def test_clear_counters(self):
         self.assertRaises(isc.cc.data.DataNotFoundError,
                           self.counters.get, 'counter')
         self.counters.inc('counter')
         self.assertEqual(self.counters.get('counter'), 1)
-        self.counters.clear_counters()
+        self.counters.clear_all()
         self.assertRaises(isc.cc.data.DataNotFoundError,
                           self.counters.get, 'counter')
 
@@ -167,7 +167,7 @@ class BaseTestCounters():
         self._perzone_prefix   = self.counters._perzone_prefix
 
     def tearDown(self):
-        self.counters.clear_counters()
+        self.counters.clear_all()
 
     def check_dump_statistics(self):
         """Checks no differences between the value returned from