Skip to content

Commit

Permalink
test: Increase coverage of MongoengineConnectionField.get_query.
Browse files Browse the repository at this point in the history
  • Loading branch information
abawchen committed Mar 19, 2018
1 parent 41978ae commit 2a322e5
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
1 change: 0 additions & 1 deletion examples/flask_mongoengine/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
tasks {
edges {
node {
id,
name,
deadline
}
Expand Down
2 changes: 2 additions & 0 deletions graphene_mongo/tests/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,5 @@ class Player(Document):
opponent = ReferenceField('Player')
players = ListField(ReferenceField('Player'))
articles = ListField(ReferenceField('Article'))
embedded_list_articles = EmbeddedDocumentListField(EmbeddedArticle)

18 changes: 17 additions & 1 deletion graphene_mongo/tests/test_relay_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,13 @@ class Query(graphene.ObjectType):
firstName
}
}
},
embeddedListArticles {
edges {
node {
headline
}
}
}
}
}
Expand All @@ -402,6 +409,9 @@ class Query(graphene.ObjectType):
}
}
]
},
'embeddedListArticles': {
'edges': []
}
}
},
Expand All @@ -416,7 +426,11 @@ class Query(graphene.ObjectType):
}
}
]
},
'embeddedListArticles': {
'edges': []
}

}
},
{
Expand All @@ -435,6 +449,9 @@ class Query(graphene.ObjectType):
}
}
]
},
'embeddedListArticles': {
'edges': []
}
}
}
Expand All @@ -446,7 +463,6 @@ class Query(graphene.ObjectType):
assert not result.errors
assert json.dumps(result.data, sort_keys=True) == json.dumps(expected, sort_keys=True)


# TODO:
def test_should_paging():
pass

0 comments on commit 2a322e5

Please sign in to comment.