Commit 3669c959 authored by Naoki Kambe's avatar Naoki Kambe
Browse files

[2781] define items() in DummDict class instead of using lambda, update note

parent 5207d193
......@@ -1397,11 +1397,11 @@ class TestStats(unittest.TestCase):
"""Test _query_statistics returns a list of pairs of module and
sequences from group_sendmsg()"""
stat = MyStats()
# imitate stat.get_statistics_data().items
# imitate stat.get_statistics_data().items. The order of the array
# returned by items() should be preserved.
class DummyDict:
items = lambda x: [
('Init', 'dummy'), ('Stats', 'dummy'), ('Auth', 'dummy'),
]
def items(self):
return [('Init', 'dummy'), ('Stats', 'dummy'), ('Auth', 'dummy')]
stat.get_statistics_data = lambda: DummyDict()
mod = ('Init', 'Auth', 'Auth')
seq = [('Init', stat._seq + 1),
......
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