We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 98d6eda commit c09bf91Copy full SHA for c09bf91
graphene_mongo/tests/test_utils.py
@@ -14,6 +14,19 @@ def test_get_model_fields_no_duplication():
14
assert len(reporter_fields) == len(reporter_name_set)
15
16
17
+def test_get_model_fields_excluding():
18
+ reporter_fields = get_model_fields(Reporter, excluding=[
19
+ 'first_name', 'last_name'])
20
+ reporter_name_set = set(reporter_fields)
21
+ assert all(field in reporter_name_set for field in [
22
+ 'id',
23
+ 'email',
24
+ 'articles',
25
+ 'embedded_articles',
26
+ 'embedded_list_articles',
27
+ 'awards'
28
+ ])
29
+
30
def test_get_model_relation_fields():
31
article_fields = get_model_fields(Article)
32
assert all(field in set(article_fields) for field in ['editor', 'reporter'])
0 commit comments