Browse Source

[trac521]
- added "test_for_boss" into test cases of stats daemon.
It tests whether the command and group name are proper.
- updated the year of copyright
- removed __version__

Naoki Kambe 14 years ago
parent
commit
4d505b0cef
1 changed files with 8 additions and 3 deletions
  1. 8 3
      src/bin/stats/tests/b10-stats_test.py

+ 8 - 3
src/bin/stats/tests/b10-stats_test.py

@@ -1,4 +1,4 @@
-# Copyright (C) 2010  Internet Systems Consortium.
+# Copyright (C) 2010,2011  Internet Systems Consortium.
 #
 # Permission to use, copy, modify, and distribute this software for any
 # purpose with or without fee is hereby granted, provided that the above
@@ -13,8 +13,6 @@
 # NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
 # WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
-__version__ = "$Revision$"
-
 #
 # Tests for the stats module
 #
@@ -504,6 +502,13 @@ class TestStats(unittest.TestCase):
         self.assertEqual(result_ok(),
                          self.session.get_message("Stats", None))
 
+    def test_for_boss(self):
+        last_queue = self.session.old_message_queue.pop()
+        self.assertEqual(
+            last_queue.msg, {'command': ['sendstats']})
+        self.assertEqual(
+            last_queue.env['group'], 'Boss')
+
 class TestStats2(unittest.TestCase):
 
     def setUp(self):