File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -314,17 +314,24 @@ class Query(graphene.ObjectType):
314
314
'node' : {
315
315
'bar' : 'bar' ,
316
316
'baz' : 'baz' ,
317
- 'loc' : '{"type": "Point", "coordinates": [10, 20]}'
318
317
}
319
318
}
320
319
]
321
320
}
322
321
}
322
+ loc = {
323
+ 'type' : 'Point' ,
324
+ 'coordinates' : [10 , 20 ]
325
+ }
326
+ loc_json_string = json .dumps (loc , sort_keys = True )
323
327
schema = graphene .Schema (query = Query )
328
+
324
329
result = schema .execute (query )
330
+ result_loc = json .loads (result .data ['children' ]['edges' ][0 ]['node' ].pop ('loc' ))
325
331
assert not result .errors
326
332
assert json .dumps (result .data , sort_keys = True ) == json .dumps (
327
333
expected , sort_keys = True )
334
+ assert json .dumps (result_loc , sort_keys = True ) == loc_json_string
328
335
329
336
330
337
def test_should_get_node_by_id (fixtures ):
You can’t perform that action at this time.
0 commit comments