mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-04-12 13:14:23 +03:00
chore: improve test
This commit is contained in:
parent
4ac711c112
commit
cc45b0bcdb
|
@ -22,9 +22,14 @@ class TestDjangoListField:
|
|||
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
|
||||
|
|
Loading…
Reference in New Issue
Block a user