File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change 12
12
from ..fields import MongoengineConnectionField
13
13
14
14
15
- def _get_nodes (data , key ):
16
- return map (lambda edge : edge ['node' ], data [key ]['edges' ])
17
-
18
-
19
15
def test_should_query_reporter (fixtures ):
20
16
21
17
class Query (graphene .ObjectType ):
@@ -555,13 +551,13 @@ class Query(graphene.ObjectType):
555
551
'editors' : {
556
552
'edges' : [
557
553
{
558
- 'cursor' : 'xxx ' ,
554
+ 'cursor' : 'YXJyYXljb25uZWN0aW9uOjA= ' ,
559
555
'node' : {
560
556
'firstName' : 'Penny'
561
557
}
562
558
},
563
559
{
564
- 'cursor' : 'xxx ' ,
560
+ 'cursor' : 'YXJyYXljb25uZWN0aW9uOjE= ' ,
565
561
'node' : {
566
562
'firstName' : 'Grant'
567
563
}
@@ -570,17 +566,16 @@ class Query(graphene.ObjectType):
570
566
'pageInfo' : {
571
567
'hasNextPage' : True ,
572
568
'hasPreviousPage' : False ,
573
- 'startCursor' : 'xxx ' ,
574
- 'endCursor' : 'xxx '
569
+ 'startCursor' : 'YXJyYXljb25uZWN0aW9uOjA= ' ,
570
+ 'endCursor' : 'YXJyYXljb25uZWN0aW9uOjE= '
575
571
}
576
572
}
577
573
}
578
574
schema = graphene .Schema (query = Query )
579
575
result = schema .execute (query )
580
576
581
577
assert not result .errors
582
- assert all (item in _get_nodes (result .data , 'editors' )
583
- for item in _get_nodes (expected , 'editors' ))
578
+ assert result .data == expected
584
579
585
580
586
581
def test_should_after (fixtures ):
You can’t perform that action at this time.
0 commit comments