mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-04-15 14:42:06 +03:00
Add test for pending deprecation warning on GraphQLTestCase._client
This commit is contained in:
parent
8cbadd037c
commit
6b8a5506de
24
graphene_django/utils/tests/test_testing.py
Normal file
24
graphene_django/utils/tests/test_testing.py
Normal file
|
@ -0,0 +1,24 @@
|
|||
import pytest
|
||||
|
||||
from .. import GraphQLTestCase
|
||||
from ...tests.test_types import with_local_registry
|
||||
|
||||
|
||||
@with_local_registry
|
||||
def test_graphql_test_case_deprecated_client():
|
||||
"""
|
||||
Test that `GraphQLTestCase._client`'s should raise pending deprecation warning.
|
||||
"""
|
||||
|
||||
class TestClass(GraphQLTestCase):
|
||||
GRAPHQL_SCHEMA = True
|
||||
|
||||
def runTest(self):
|
||||
pass
|
||||
|
||||
tc = TestClass()
|
||||
tc._pre_setup()
|
||||
tc.setUpClass()
|
||||
|
||||
with pytest.warns(PendingDeprecationWarning):
|
||||
tc._client
|
Loading…
Reference in New Issue
Block a user