File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change 1
1
from ..fields import MongoengineConnectionField
2
2
from .types import ArticleNode , PublisherNode , ErroneousModelNode
3
+ from .setup import fixtures
3
4
4
5
5
6
def test_field_args ():
@@ -35,3 +36,11 @@ def test_default_resolver_with_colliding_objects_field():
35
36
36
37
connection = field .default_resolver (None , {})
37
38
assert 0 == len (connection .iterable )
39
+
40
+
41
+ def test_default_resolver_connection_list_length (fixtures ):
42
+ field = MongoengineConnectionField (ArticleNode )
43
+
44
+ connection = field .default_resolver (None , {})
45
+ assert hasattr (connection , 'list_length' )
46
+ assert connection .list_length == 2
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ per-file-ignores =
8
8
graphene_mongo/tests/test_mutation.py: F401, F811
9
9
graphene_mongo/tests/test_query.py: F401, F811
10
10
graphene_mongo/tests/test_relay_query.py: F401, F811
11
+ graphene_mongo/tests/test_fields.py: F401, F811
11
12
[coverage:run]
12
13
omit = */tests/*
13
14
You can’t perform that action at this time.
0 commit comments