Skip to content

Commit cc45b0b

Browse files
committed
chore: improve test
1 parent 4ac711c commit cc45b0b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

graphene_django/tests/test_fields.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,14 @@ def test_only_django_object_types(self):
2222
class Query(ObjectType):
2323
something = DjangoListField(String)
2424

25-
with pytest.raises(TypeError):
25+
with pytest.raises(TypeError) as excinfo:
2626
Schema(query=Query)
2727

28+
assert (
29+
"Query fields cannot be resolved. DjangoListField only accepts DjangoObjectType types as underlying type"
30+
in str(excinfo.value)
31+
)
32+
2833
def test_only_import_paths(self):
2934
list_field = DjangoListField("graphene_django.tests.schema.Human")
3035
from .schema import Human

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy