Skip to content

Commit 907797c

Browse files
committed
test: Take care PointType assertion
1 parent d563437 commit 907797c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

graphene_mongo/tests/test_relay_query.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,17 +314,24 @@ class Query(graphene.ObjectType):
314314
'node': {
315315
'bar': 'bar',
316316
'baz': 'baz',
317-
'loc': '{"type": "Point", "coordinates": [10, 20]}'
318317
}
319318
}
320319
]
321320
}
322321
}
322+
loc = {
323+
'type': 'Point',
324+
'coordinates': [10, 20]
325+
}
326+
loc_json_string = json.dumps(loc, sort_keys=True)
323327
schema = graphene.Schema(query=Query)
328+
324329
result = schema.execute(query)
330+
result_loc = json.loads(result.data['children']['edges'][0]['node'].pop('loc'))
325331
assert not result.errors
326332
assert json.dumps(result.data, sort_keys=True) == json.dumps(
327333
expected, sort_keys=True)
334+
assert json.dumps(result_loc, sort_keys=True) == loc_json_string
328335

329336

330337
def test_should_get_node_by_id(fixtures):

0 commit comments

Comments
 (0)