@@ -80,8 +80,8 @@ async def test_qdrant_migration_trigger(mock_qdrant_client, mock_embedding_func)
8080
8181 # Setup mocks for migration scenario
8282 # 1. New collection does not exist, only legacy exists
83- mock_qdrant_client .collection_exists .side_effect = (
84- lambda name : name == legacy_collection
83+ mock_qdrant_client .collection_exists .side_effect = lambda name : (
84+ name == legacy_collection
8585 )
8686
8787 # 2. Legacy collection exists and has data
@@ -173,8 +173,8 @@ async def test_qdrant_no_migration_needed(mock_qdrant_client, mock_embedding_fun
173173 )
174174
175175 # Only new collection exists (no legacy collection found)
176- mock_qdrant_client .collection_exists .side_effect = (
177- lambda name : name == storage .final_namespace
176+ mock_qdrant_client .collection_exists .side_effect = lambda name : (
177+ name == storage .final_namespace
178178 )
179179
180180 # Initialize
@@ -285,8 +285,8 @@ async def test_scenario_2_legacy_upgrade_migration(
285285 new_collection = storage .final_namespace
286286
287287 # Case 4: Only legacy collection exists
288- mock_qdrant_client .collection_exists .side_effect = (
289- lambda name : name == legacy_collection
288+ mock_qdrant_client .collection_exists .side_effect = lambda name : (
289+ name == legacy_collection
290290 )
291291
292292 # Mock legacy collection info with 1536d vectors
@@ -454,10 +454,13 @@ async def test_case1_empty_legacy_auto_cleanup(mock_qdrant_client, mock_embeddin
454454 new_collection = storage .final_namespace
455455
456456 # Mock: Both collections exist
457- mock_qdrant_client .collection_exists .side_effect = lambda name : name in [
458- legacy_collection ,
459- new_collection ,
460- ]
457+ mock_qdrant_client .collection_exists .side_effect = lambda name : (
458+ name
459+ in [
460+ legacy_collection ,
461+ new_collection ,
462+ ]
463+ )
461464
462465 # Mock: Legacy collection is empty (0 records)
463466 def count_mock (collection_name , exact = True , count_filter = None ):
@@ -520,10 +523,13 @@ async def test_case1_nonempty_legacy_warning(mock_qdrant_client, mock_embedding_
520523 new_collection = storage .final_namespace
521524
522525 # Mock: Both collections exist
523- mock_qdrant_client .collection_exists .side_effect = lambda name : name in [
524- legacy_collection ,
525- new_collection ,
526- ]
526+ mock_qdrant_client .collection_exists .side_effect = lambda name : (
527+ name
528+ in [
529+ legacy_collection ,
530+ new_collection ,
531+ ]
532+ )
527533
528534 # Mock: Legacy collection has data (50 records)
529535 def count_mock (collection_name , exact = True , count_filter = None ):
0 commit comments