Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sebastian Schrader
Kea
Commits
3669c959
Commit
3669c959
authored
Aug 23, 2013
by
Naoki Kambe
Browse files
[2781] define items() in DummDict class instead of using lambda, update note
parent
5207d193
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/bin/stats/tests/stats_test.py
View file @
3669c959
...
...
@@ -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
),
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment