Skip to content

Commit ec67bbd

Browse files
committed
TESTS suppress expected type_def deprecation warning in test
1 parent 07cdaf4 commit ec67bbd

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

tests/test_async_client_validation.py

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import asyncio
22
import json
3+
import warnings
34

45
import graphql
56
import pytest
@@ -93,7 +94,13 @@ async def test_async_client_validation(
9394

9495
sample_transport = WebsocketsTransport(url=url)
9596

96-
async with Client(transport=sample_transport, **client_params) as session:
97+
with warnings.catch_warnings():
98+
warnings.filterwarnings(
99+
"ignore", message="type_def is deprecated; use schema instead"
100+
)
101+
client = Client(transport=sample_transport, **client_params)
102+
103+
async with client as session:
97104

98105
variable_values = {"ep": "JEDI"}
99106

@@ -136,7 +143,13 @@ async def test_async_client_validation_invalid_query(
136143

137144
sample_transport = WebsocketsTransport(url=url)
138145

139-
async with Client(transport=sample_transport, **client_params) as session:
146+
with warnings.catch_warnings():
147+
warnings.filterwarnings(
148+
"ignore", message="type_def is deprecated; use schema instead"
149+
)
150+
client = Client(transport=sample_transport, **client_params)
151+
152+
async with client as session:
140153

141154
variable_values = {"ep": "JEDI"}
142155

0 commit comments

Comments
 (0)