Skip to content

Commit 6b8a550

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

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+
13+
class TestClass(GraphQLTestCase):
14+
GRAPHQL_SCHEMA = True
15+
16+
def runTest(self):
17+
pass
18+
19+
tc = TestClass()
20+
tc._pre_setup()
21+
tc.setUpClass()
22+
23+
with pytest.warns(PendingDeprecationWarning):
24+
tc._client

0 commit comments

Comments
 (0)