Don't break backward compability

This commit is contained in:
Ülgen Sarıkavak 2020-12-30 06:13:52 +03:00
parent d545ad44fc
commit 8cbadd037c

View File

@ -1,6 +1,7 @@
import json
import warnings
from django.test import TestCase, Client
from django.test import Client, TestCase
DEFAULT_GRAPHQL_URL = "/graphql/"
@ -97,6 +98,15 @@ class GraphQLTestCase(TestCase):
graphql_url=self.GRAPHQL_URL,
)
@property
def _client(self):
warnings.warn(
"Using `_client` is deprecated in favour of `client`.",
PendingDeprecationWarning,
stacklevel=2,
)
return self.client
def assertResponseNoErrors(self, resp, msg=None):
"""
Assert that the call went through correctly. 200 means the syntax is ok, if there are no `errors`,