dashboard: fix doctests (again)
Dict order
Showing
Dict order
... | @@ -190,13 +190,18 @@ class FilterMixin(object): | ... | @@ -190,13 +190,18 @@ class FilterMixin(object): |
The final dict looks like this: {'name': xy, 'node':1} | The final dict looks like this: {'name': xy, 'node':1} | ||
>>> f = FilterMixin() | >>> f = FilterMixin() | ||
>>> f._parse_get({'s': "hello"}) # doctest: +ELLIPSIS | >>> o = f._parse_get({'s': "hello"}).items() | ||
{u's': u'...', u'name': u'hello'} | >>> o.sort() | ||
>>> f._parse_get({'s': "name:hello owner:test"}) # doctest: +ELLIPSIS | >>> o # doctest: +ELLIPSIS | ||
Please
register
or
sign in
to reply
|
|||
{u'owner': u'test', u's': u'...', u'name': u'hello'} | [(u'name', u'hello'), (...)] | ||
>>> f._parse_get({'s': "name:hello whitespace node:node 3 oh"}) | >>> o = f._parse_get({'s': "name:hello owner:test"}).items() | ||
... # doctest: +ELLIPSIS | >>> o.sort() | ||
{u'node': u'node 3 oh', u's': u'...', u'name': u'hello whitespace'} | >>> o # doctest: +ELLIPSIS | ||
[(u'name', u'hello'), (u'owner', u'test'), (...)] | |||
>>> o = f._parse_get({'s': "name:hello ws node:node 3 oh"}).items() | |||
>>> o.sort() | |||
>>> o # doctest: +ELLIPSIS | |||
[(u'name', u'hello ws'), (u'node', u'node 3 oh'), (...)] | |||
""" | """ | ||
s = GET_dict.get("s") | s = GET_dict.get("s") | ||
fake = GET_dict.copy() | fake = GET_dict.copy() | ||
... | ... |