Skip to content

Commit 70c4190

Browse files
committed
Fix tests to allow graphql-core>=3.1.5 to break arguments over multiple lines
1 parent a5ff57c commit 70c4190

File tree

1 file changed

+28
-2
lines changed

1 file changed

+28
-2
lines changed

tests/starwars/test_dsl.py

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,9 +264,15 @@ def test_multiple_operations(ds):
264264
),
265265
)
266266

267+
"""
268+
From graphql-core version 3.1.5, print_ast() break arguments over multiple lines
269+
Accepting both cases here
270+
"""
271+
267272
assert (
268-
print_ast(query)
269-
== """query GetHeroName {
273+
(
274+
print_ast(query)
275+
== """query GetHeroName {
270276
hero {
271277
name
272278
}
@@ -280,6 +286,26 @@ def test_multiple_operations(ds):
280286
}
281287
}
282288
"""
289+
)
290+
or (
291+
print_ast(query)
292+
== """query GetHeroName {
293+
hero {
294+
name
295+
}
296+
}
297+
298+
mutation CreateReviewMutation {
299+
createReview(
300+
episode: JEDI
301+
review: {stars: 5, commentary: "This is a great movie!"}
302+
) {
303+
stars
304+
commentary
305+
}
306+
}
307+
"""
308+
)
283309
)
284310

285311

0 commit comments

Comments
 (0)