Commit 5207d193 authored by Naoki Kambe's avatar Naoki Kambe
Browse files

[2781] correct description of test_get_multi_module_list_initsessiontimeout()

and revise the test code to match this
parent c3473496
...@@ -1384,14 +1384,14 @@ class TestStats(unittest.TestCase): ...@@ -1384,14 +1384,14 @@ class TestStats(unittest.TestCase):
self.assertListEqual([], stat._get_multi_module_list()) self.assertListEqual([], stat._get_multi_module_list())
def test_get_multi_module_list_initsessiontimeout(self): def test_get_multi_module_list_initsessiontimeout(self):
"""Test _get_multi_module_list() returns an empty list if rcp_call() """Test _get_multi_module_list() raises an InitSeeionTimeout exception
raise a InitSeeionTimeout exception""" if a CC session times out in rcp_call()"""
# InitSeeionTimeout case # InitSeeionTimeout case
stat = MyStats() stat = MyStats()
ex = stats.InitSessionTimeout ex = isc.cc.session.SessionTimeout
def __raise(*x): raise ex(*x) def __raise(*x): raise ex(*x)
stat.mccs.rpc_call = lambda x,y: __raise() stat.mccs.rpc_call = lambda x,y: __raise()
self.assertRaises(ex, stat._get_multi_module_list) self.assertRaises(stats.InitSessionTimeout, stat._get_multi_module_list)
def test_query_statistics(self): def test_query_statistics(self):
"""Test _query_statistics returns a list of pairs of module and """Test _query_statistics returns a list of pairs of module and
......
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