@@ -89,19 +89,6 @@ def test_schema_execute(test_schema, test_source_str):
89
89
assert result .data == {"patron" : {"id" : "1" , "name" : "Syrus" , "age" : 27 }}
90
90
91
91
92
- @pytest .mark .snapshot (
93
- ignores = ["meta.events" , "meta.error.stack" ], variants = {"v2" : graphene .VERSION < (3 ,), "" : graphene .VERSION >= (3 ,)}
94
- )
95
- @pytest .mark .snapshot
96
- def test_schema_failing_extensions ():
97
- schema = graphene .Schema (query = Query )
98
- os .environ ["DD_TRACE_GRAPHQL_ERROR_EXTENSIONS" ] = "code, status"
99
-
100
- query_string = '{ user(id: "999") }'
101
- result = schema .execute (query_string )
102
- assert result .errors
103
-
104
-
105
92
@pytest .mark .asyncio
106
93
@pytest .mark .snapshot (token = "tests.contrib.graphene.test_graphene.test_schema_execute" )
107
94
@pytest .mark .skipif (graphene .VERSION < (3 , 0 , 0 ), reason = "execute_async is only supported in graphene>=3.0" )
@@ -127,6 +114,15 @@ async def test_schema_execute_async_with_resolvers(test_schema, test_source_str,
127
114
assert result .data == {"patron" : {"id" : "1" , "name" : "Syrus" , "age" : 27 }}
128
115
129
116
117
+ @pytest .mark .snapshot
118
+ def test_schema_failing_extensions (test_schema , test_source_str , enable_graphql_resolvers ):
119
+ schema = graphene .Schema (query = Query )
120
+ os .environ ["DD_TRACE_GRAPHQL_ERROR_EXTENSIONS" ] = "code, status"
121
+ query_string = '{ user(id: "999") }'
122
+ result = schema .execute (query_string )
123
+ assert result .errors
124
+
125
+
130
126
@pytest .mark .snapshot (
131
127
ignores = ["meta.events" , "meta.error.stack" ], variants = {"v2" : graphene .VERSION < (3 ,), "" : graphene .VERSION >= (3 ,)}
132
128
)
0 commit comments