Skip to content

Commit 26c92a5

Browse files
committed
test: Make test_relay_query.test_should_get_node_by_id more readable.
1 parent 41dc694 commit 26c92a5

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

graphene_mongo/tests/test_relay_query.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -232,17 +232,16 @@ class Query(graphene.ObjectType):
232232

233233

234234
def test_should_get_node_by_id():
235+
# Notes: https://goo.gl/hMNRgs
235236
class Query(graphene.ObjectType):
236-
node = Node.Field()
237+
reporter = Node.Field(ReporterNode)
237238
reporters = MongoengineConnectionField(ReporterNode)
238239

239240
query = '''
240241
query ReportersQuery {
241-
reporter: node(id: "UmVwb3J0ZXJOb2RlOjE=") {
242+
reporter (id: "UmVwb3J0ZXJOb2RlOjE=") {
242243
id,
243-
... on ReporterNode {
244-
firstName
245-
}
244+
firstName
246245
}
247246
}
248247
'''

0 commit comments

Comments
 (0)