Commit 4d505b0c authored by Naoki Kambe's avatar Naoki Kambe

[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__
parent 6ff2a83c
# 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):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment