File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
graphene_sqlalchemy/tests Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -730,8 +730,15 @@ async def test_batching_across_nested_relay_schema(session_factory):
730
730
messages = sqlalchemy_logging_handler .messages
731
731
732
732
result = to_std_dicts (result .data )
733
- select_statements = [message for message in messages if 'SELECT' in message and 'FROM articles' in message ]
734
- assert len (select_statements ) == 2
733
+ select_statements = [message for message in messages if 'SELECT' in message ]
734
+ assert len (select_statements ) == 4
735
+ assert select_statements [- 1 ].startswith ("SELECT articles_1.id" )
736
+ if is_sqlalchemy_version_less_than ('1.3' ):
737
+ assert select_statements [- 2 ].startswith ("SELECT reporters_1.id" )
738
+ assert "WHERE reporters_1.id IN" in select_statements [- 2 ]
739
+ else :
740
+ assert select_statements [- 2 ].startswith ("SELECT articles.reporter_id" )
741
+ assert "WHERE articles.reporter_id IN" in select_statements [- 2 ]
735
742
736
743
737
744
@pytest .mark .asyncio
You can’t perform that action at this time.
0 commit comments