Browse Source

[2225_xfrout] update the counter object and its getter method since the interface of the counter class was changed

Naoki Kambe 12 years ago
parent
commit
8b9c751d90
1 changed files with 9 additions and 5 deletions
  1. 9 5
      src/lib/python/isc/notify/tests/notify_out_test.py

+ 9 - 5
src/lib/python/isc/notify/tests/notify_out_test.py

@@ -112,7 +112,7 @@ class TestNotifyOut(unittest.TestCase):
         com_ch_info.notify_slaves.append(('1.1.1.1', 5353))
 
     def tearDown(self):
-        Counter.clear_counters()
+        self._notify._counter.clear_counters()
 
     def test_send_notify(self):
         notify_out._MAX_NOTIFY_NUM = 2
@@ -274,8 +274,10 @@ class TestNotifyOut(unittest.TestCase):
                                                     ('192.0.2.1', 53))
         self.assertTrue(ret)
         self.assertEqual(socket.AF_INET, example_com_info.sock_family)
-        self.assertGreater(Counter.get_notifyoutv4('example.net.'), 0)
-        self.assertEqual(Counter.get_notifyoutv6('example.net.'), 0)
+        self.assertEqual(self._notify._counter.get(
+                'zones', 'example.net.', 'notifyoutv4'), 0)
+        self.assertEqual(self._notify._counter.get(
+                'zones', 'example.net.', 'notifyoutv6'), 0)
 
     def test_send_notify_message_udp_ipv6(self):
         example_com_info = self._notify._notify_infos[('example.net.', 'IN')]
@@ -287,8 +289,10 @@ class TestNotifyOut(unittest.TestCase):
                                                     ('2001:db8::53', 53))
         self.assertTrue(ret)
         self.assertEqual(socket.AF_INET6, example_com_info.sock_family)
-        self.assertEqual(Counter.get_notifyoutv4('example.net.'), 0)
-        self.assertGreater(Counter.get_notifyoutv6('example.net.'), 0)
+        self.assertEqual(self._notify._counter.get(
+                'zones', 'example.net.', 'notifyoutv4'), 0)
+        self.assertEqual(self._notify._counter.get(
+                'zones', 'example.net.', 'notifyoutv6'), 0)
 
     def test_send_notify_message_with_bogus_address(self):
         example_com_info = self._notify._notify_infos[('example.net.', 'IN')]