mirror of
https://github.com/graphql-python/graphene-django.git
synced 2024-11-22 09:37:07 +03:00
Merge pull request #631 from graphql-python/fix-628
Fix importing error for GraphQLTestCase
This commit is contained in:
commit
e26a9f2a44
|
@ -9,7 +9,7 @@ Usage:
|
|||
|
||||
import json
|
||||
|
||||
from graphene_django.tests.base_test import GraphQLTestCase
|
||||
from graphene_django.utils.testing import GraphQLTestCase
|
||||
from my_project.config.schema import schema
|
||||
|
||||
class MyFancyTestCase(GraphQLTestCase):
|
||||
|
|
19
graphene_django/utils/__init__.py
Normal file
19
graphene_django/utils/__init__.py
Normal file
|
@ -0,0 +1,19 @@
|
|||
from .utils import (
|
||||
DJANGO_FILTER_INSTALLED,
|
||||
get_reverse_fields,
|
||||
maybe_queryset,
|
||||
get_model_fields,
|
||||
is_valid_django_model,
|
||||
import_single_dispatch,
|
||||
)
|
||||
from .testing import GraphQLTestCase
|
||||
|
||||
__all__ = [
|
||||
"DJANGO_FILTER_INSTALLED",
|
||||
"get_reverse_fields",
|
||||
"maybe_queryset",
|
||||
"get_model_fields",
|
||||
"is_valid_django_model",
|
||||
"import_single_dispatch",
|
||||
"GraphQLTestCase",
|
||||
]
|
|
@ -1,8 +1,6 @@
|
|||
import json
|
||||
|
||||
from django.http import HttpResponse
|
||||
from django.test import Client
|
||||
from django.test import TestCase
|
||||
from django.test import TestCase, Client
|
||||
|
||||
|
||||
class GraphQLTestCase(TestCase):
|
|
@ -4,13 +4,6 @@ from django.db import models
|
|||
from django.db.models.manager import Manager
|
||||
|
||||
|
||||
# from graphene.utils import LazyList
|
||||
|
||||
|
||||
class LazyList(object):
|
||||
pass
|
||||
|
||||
|
||||
try:
|
||||
import django_filters # noqa
|
||||
|
Loading…
Reference in New Issue
Block a user