Skip to content

Commit

Permalink
chore: improve test
Browse files Browse the repository at this point in the history
  • Loading branch information
superlevure committed Jan 18, 2024
1 parent 4ac711c commit cc45b0b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion graphene_django/tests/test_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,14 @@ def test_only_django_object_types(self):
class Query(ObjectType):
something = DjangoListField(String)

with pytest.raises(TypeError):
with pytest.raises(TypeError) as excinfo:
Schema(query=Query)

assert (
"Query fields cannot be resolved. DjangoListField only accepts DjangoObjectType types as underlying type"
in str(excinfo.value)
)

def test_only_import_paths(self):
list_field = DjangoListField("graphene_django.tests.schema.Human")
from .schema import Human
Expand Down

0 comments on commit cc45b0b

Please sign in to comment.