mirror of
https://github.com/graphql-python/graphene.git
synced 2025-02-08 23:50:38 +03:00
Convert inputs to OrderedDicts
This commit is contained in:
parent
1f541e4467
commit
1e40eceab3
|
@ -1,4 +1,5 @@
|
||||||
import pytest
|
import pytest
|
||||||
|
from collections import OrderedDict
|
||||||
|
|
||||||
from ..crunch import crunch
|
from ..crunch import crunch
|
||||||
|
|
||||||
|
@ -17,22 +18,29 @@ from ..crunch import crunch
|
||||||
['single-item object', {'a': None}, [None, {'a': 0}]],
|
['single-item object', {'a': None}, [None, {'a': 0}]],
|
||||||
[
|
[
|
||||||
'multi-item all distinct object',
|
'multi-item all distinct object',
|
||||||
{'a': None, 'b': 0, 'c': True, 'd': "string"},
|
OrderedDict([('a', None), ('b', 0), ('c', True), ('d', 'string')]),
|
||||||
[None, 0, True, "string", {'a': 0, 'b': 1, 'c': 2, 'd': 3}]
|
[None, 0, True, "string", {'a': 0, 'b': 1, 'c': 2, 'd': 3}]
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'multi-item repeated object',
|
'multi-item repeated object',
|
||||||
{'a': True, 'b': True, 'c': True, 'd': True},
|
OrderedDict([('a', True), ('b', True), ('c', True), ('d', True)]),
|
||||||
[True, {'a': 0, 'b': 0, 'c': 0, 'd': 0}]
|
[True, {'a': 0, 'b': 0, 'c': 0, 'd': 0}]
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'complex array',
|
'complex array',
|
||||||
[{'a': True, 'b': [1, 2, 3]}, [1, 2, 3]],
|
[
|
||||||
|
OrderedDict([('a', True), ('b', [1, 2, 3])]),
|
||||||
|
[1, 2, 3]
|
||||||
|
],
|
||||||
[True, 1, 2, 3, [1, 2, 3], {'a': 0, 'b': 4}, [5, 4]]
|
[True, 1, 2, 3, [1, 2, 3], {'a': 0, 'b': 4}, [5, 4]]
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'complex object',
|
'complex object',
|
||||||
{'a': True, 'b': [1, 2, 3], 'c': {'a': True, 'b': [1, 2, 3]}},
|
OrderedDict([
|
||||||
|
('a', True),
|
||||||
|
('b', [1, 2, 3]),
|
||||||
|
('c', OrderedDict([('a', True), ('b', [1, 2, 3])]))
|
||||||
|
]),
|
||||||
[True, 1, 2, 3, [1, 2, 3], {'a': 0, 'b': 4}, {'a': 0, 'b': 4, 'c': 5}]
|
[True, 1, 2, 3, [1, 2, 3], {'a': 0, 'b': 4}, {'a': 0, 'b': 4, 'c': 5}]
|
||||||
],
|
],
|
||||||
])
|
])
|
||||||
|
|
Loading…
Reference in New Issue
Block a user