Skip to content

Commit 2bf7e7f

Browse files
author
Paul Hallett
committed
Fix importing error for GraphQLTestCase
1 parent 223d0b1 commit 2bf7e7f

File tree

4 files changed

+21
-11
lines changed

4 files changed

+21
-11
lines changed

docs/testing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Usage:
99
1010
import json
1111
12-
from graphene_django.tests.base_test import GraphQLTestCase
12+
from graphene_django.utils.testing import GraphQLTestCase
1313
from my_project.config.schema import schema
1414
1515
class MyFancyTestCase(GraphQLTestCase):

graphene_django/utils/__init__.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
from .utils import (
2+
DJANGO_FILTER_INSTALLED,
3+
get_reverse_fields,
4+
maybe_queryset,
5+
get_model_fields,
6+
is_valid_django_model,
7+
import_single_dispatch,
8+
)
9+
from .testing import GraphQLTestCase
10+
11+
__all__ = [
12+
"DJANGO_FILTER_INSTALLED",
13+
"get_reverse_fields",
14+
"maybe_queryset",
15+
"get_model_fields",
16+
"is_valid_django_model",
17+
"import_single_dispatch",
18+
"GraphQLTestCase",
19+
]

graphene_django/tests/base_test.py renamed to graphene_django/utils/testing.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import json
22

3-
from django.http import HttpResponse
4-
from django.test import Client
5-
from django.test import TestCase
3+
from django.test import TestCase, Client
64

75

86
class GraphQLTestCase(TestCase):

graphene_django/utils.py renamed to graphene_django/utils/utils.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,6 @@
44
from django.db.models.manager import Manager
55

66

7-
# from graphene.utils import LazyList
8-
9-
10-
class LazyList(object):
11-
pass
12-
13-
147
try:
158
import django_filters # noqa
169

0 commit comments

Comments
 (0)