1
1
import asyncio
2
2
import json
3
- import warnings
4
3
5
4
import graphql
6
5
import pytest
@@ -83,7 +82,6 @@ async def server_starwars(ws, path):
83
82
[
84
83
{"schema" : StarWarsSchema },
85
84
{"introspection" : StarWarsIntrospection },
86
- {"type_def" : StarWarsTypeDef },
87
85
{"schema" : StarWarsTypeDef },
88
86
],
89
87
)
@@ -97,11 +95,7 @@ async def test_async_client_validation(
97
95
98
96
sample_transport = WebsocketsTransport (url = url )
99
97
100
- with warnings .catch_warnings ():
101
- warnings .filterwarnings (
102
- "ignore" , message = "type_def is deprecated; use schema instead"
103
- )
104
- client = Client (transport = sample_transport , ** client_params )
98
+ client = Client (transport = sample_transport , ** client_params )
105
99
106
100
async with client as session :
107
101
@@ -135,7 +129,6 @@ async def test_async_client_validation(
135
129
[
136
130
{"schema" : StarWarsSchema },
137
131
{"introspection" : StarWarsIntrospection },
138
- {"type_def" : StarWarsTypeDef },
139
132
{"schema" : StarWarsTypeDef },
140
133
],
141
134
)
@@ -149,11 +142,7 @@ async def test_async_client_validation_invalid_query(
149
142
150
143
sample_transport = WebsocketsTransport (url = url )
151
144
152
- with warnings .catch_warnings ():
153
- warnings .filterwarnings (
154
- "ignore" , message = "type_def is deprecated; use schema instead"
155
- )
156
- client = Client (transport = sample_transport , ** client_params )
145
+ client = Client (transport = sample_transport , ** client_params )
157
146
158
147
async with client as session :
159
148
@@ -174,11 +163,7 @@ async def test_async_client_validation_invalid_query(
174
163
@pytest .mark .parametrize ("subscription_str" , [starwars_invalid_subscription_str ])
175
164
@pytest .mark .parametrize (
176
165
"client_params" ,
177
- [
178
- {"schema" : StarWarsSchema , "introspection" : StarWarsIntrospection },
179
- {"schema" : StarWarsSchema , "type_def" : StarWarsTypeDef },
180
- {"introspection" : StarWarsIntrospection , "type_def" : StarWarsTypeDef },
181
- ],
166
+ [{"schema" : StarWarsSchema , "introspection" : StarWarsIntrospection }],
182
167
)
183
168
async def test_async_client_validation_different_schemas_parameters_forbidden (
184
169
event_loop , server , subscription_str , client_params
0 commit comments