Skip to content

Commit 730b777

Browse files
committed
Remove implicit ORDER BY clause from tests
Since SQLAlchemy 1.3.16 `orm.selectinload` will no longer `ORDER BY` the primary key of the parent entity.
1 parent 421f8e4 commit 730b777

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

graphene_sqlalchemy/tests/test_batching.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,7 @@ def test_one_to_one(session_factory):
233233
'articles.headline AS articles_headline, '
234234
'articles.pub_date AS articles_pub_date \n'
235235
'FROM articles \n'
236-
'WHERE articles.reporter_id IN (?, ?) '
237-
'ORDER BY articles.reporter_id',
236+
'WHERE articles.reporter_id IN (?, ?)',
238237
'(1, 2)'
239238
]
240239

@@ -337,8 +336,7 @@ def test_one_to_many(session_factory):
337336
'articles.headline AS articles_headline, '
338337
'articles.pub_date AS articles_pub_date \n'
339338
'FROM articles \n'
340-
'WHERE articles.reporter_id IN (?, ?) '
341-
'ORDER BY articles.reporter_id',
339+
'WHERE articles.reporter_id IN (?, ?)',
342340
'(1, 2)'
343341
]
344342

@@ -470,7 +468,7 @@ def test_many_to_many(session_factory):
470468
'JOIN association AS association_1 ON reporters_1.id = association_1.reporter_id '
471469
'JOIN pets ON pets.id = association_1.pet_id \n'
472470
'WHERE reporters_1.id IN (?, ?) '
473-
'ORDER BY reporters_1.id, pets.id',
471+
'ORDER BY pets.id',
474472
'(1, 2)'
475473
]
476474

0 commit comments

Comments
 (0)