Skip to content

Commit 8cbadd0

Browse files
committed
Don't break backward compability
1 parent d545ad4 commit 8cbadd0

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

graphene_django/utils/testing.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import json
2+
import warnings
23

3-
from django.test import TestCase, Client
4+
from django.test import Client, TestCase
45

56
DEFAULT_GRAPHQL_URL = "/graphql/"
67

@@ -97,6 +98,15 @@ def query(self, query, op_name=None, input_data=None, variables=None, headers=No
9798
graphql_url=self.GRAPHQL_URL,
9899
)
99100

101+
@property
102+
def _client(self):
103+
warnings.warn(
104+
"Using `_client` is deprecated in favour of `client`.",
105+
PendingDeprecationWarning,
106+
stacklevel=2,
107+
)
108+
return self.client
109+
100110
def assertResponseNoErrors(self, resp, msg=None):
101111
"""
102112
Assert that the call went through correctly. 200 means the syntax is ok, if there are no `errors`,

0 commit comments

Comments
 (0)