Skip to content

Commit f0de876

Browse files
committed
Add test for pending deprecation warning on GraphQLTestCase._client
1 parent 8cbadd0 commit f0de876

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import pytest
2+
3+
from .. import GraphQLTestCase
4+
from ...tests.test_types import with_local_registry
5+
6+
7+
@with_local_registry
8+
def test_graphql_test_case_deprecated_client():
9+
"""
10+
Test that `GraphQLTestCase._client`'s should raise pending deprecation warning.
11+
"""
12+
class TestClass(GraphQLTestCase):
13+
GRAPHQL_SCHEMA = True
14+
15+
def runTest(self):
16+
pass
17+
18+
tc = TestClass()
19+
tc._pre_setup()
20+
tc.setUpClass()
21+
22+
with pytest.warns(PendingDeprecationWarning):
23+
tc._client
24+

0 commit comments

Comments
 (0)