2121import pytest
2222import sqlalchemy as sa
2323from faker import Faker
24- from models_library .projects import ProjectIDStr
2524from models_library .projects_nodes_io import (
2625 BaseFileLink ,
2726 DownloadLink ,
@@ -156,10 +155,10 @@ def config_value_symlink_path(symlink_path: Path) -> dict[str, Any]:
156155
157156@pytest .fixture (params = [True , False ])
158157async def option_r_clone_settings (
159- request , r_clone_settings_factory : Awaitable [RCloneSettings ]
158+ request , r_clone_settings_factory : Callable [[], Awaitable [RCloneSettings ] ]
160159) -> RCloneSettings | None :
161160 if request .param :
162- return await r_clone_settings_factory
161+ return await r_clone_settings_factory ()
163162 return None
164163
165164
@@ -174,7 +173,7 @@ async def test_default_configuration(
174173 await check_config_valid (
175174 await node_ports_v2 .ports (
176175 user_id = user_id ,
177- project_id = ProjectIDStr ( project_id ) ,
176+ project_id = project_id ,
178177 node_uuid = node_uuid ,
179178 r_clone_settings = option_r_clone_settings ,
180179 ),
@@ -192,7 +191,7 @@ async def test_invalid_ports(
192191 config_dict , _ , _ = create_special_configuration ()
193192 PORTS = await node_ports_v2 .ports (
194193 user_id = user_id ,
195- project_id = ProjectIDStr ( project_id ) ,
194+ project_id = project_id ,
196195 node_uuid = node_uuid ,
197196 r_clone_settings = option_r_clone_settings ,
198197 )
@@ -238,7 +237,7 @@ async def test_port_value_accessors(
238237
239238 PORTS = await node_ports_v2 .ports (
240239 user_id = user_id ,
241- project_id = ProjectIDStr ( project_id ) ,
240+ project_id = project_id ,
242241 node_uuid = node_uuid ,
243242 r_clone_settings = option_r_clone_settings ,
244243 )
@@ -298,7 +297,7 @@ async def test_port_file_accessors(
298297
299298 PORTS = await node_ports_v2 .ports (
300299 user_id = user_id ,
301- project_id = ProjectIDStr ( project_id ) ,
300+ project_id = project_id ,
302301 node_uuid = node_uuid ,
303302 r_clone_settings = option_r_clone_settings ,
304303 )
@@ -375,7 +374,7 @@ async def test_adding_new_ports(
375374 config_dict , project_id , node_uuid = create_special_configuration ()
376375 PORTS = await node_ports_v2 .ports (
377376 user_id = user_id ,
378- project_id = ProjectIDStr ( project_id ) ,
377+ project_id = project_id ,
379378 node_uuid = node_uuid ,
380379 r_clone_settings = option_r_clone_settings ,
381380 )
@@ -429,7 +428,7 @@ async def test_removing_ports(
429428 ) # pylint: disable=W0612
430429 PORTS = await node_ports_v2 .ports (
431430 user_id = user_id ,
432- project_id = ProjectIDStr ( project_id ) ,
431+ project_id = project_id ,
433432 node_uuid = node_uuid ,
434433 r_clone_settings = option_r_clone_settings ,
435434 )
@@ -489,7 +488,7 @@ async def test_get_value_from_previous_node(
489488
490489 PORTS = await node_ports_v2 .ports (
491490 user_id = user_id ,
492- project_id = ProjectIDStr ( project_id ) ,
491+ project_id = project_id ,
493492 node_uuid = node_uuid ,
494493 r_clone_settings = option_r_clone_settings ,
495494 )
@@ -541,7 +540,7 @@ async def test_get_file_from_previous_node(
541540 )
542541 PORTS = await node_ports_v2 .ports (
543542 user_id = user_id ,
544- project_id = ProjectIDStr ( project_id ) ,
543+ project_id = project_id ,
545544 node_uuid = node_uuid ,
546545 r_clone_settings = option_r_clone_settings ,
547546 )
@@ -598,7 +597,7 @@ async def test_get_file_from_previous_node_with_mapping_of_same_key_name(
598597 )
599598 PORTS = await node_ports_v2 .ports (
600599 user_id = user_id ,
601- project_id = ProjectIDStr ( project_id ) ,
600+ project_id = project_id ,
602601 node_uuid = node_uuid ,
603602 r_clone_settings = option_r_clone_settings ,
604603 )
@@ -659,7 +658,7 @@ async def test_file_mapping(
659658 )
660659 PORTS = await node_ports_v2 .ports (
661660 user_id = user_id ,
662- project_id = ProjectIDStr ( project_id ) ,
661+ project_id = project_id ,
663662 node_uuid = node_uuid ,
664663 r_clone_settings = option_r_clone_settings ,
665664 )
@@ -752,7 +751,7 @@ async def test_regression_concurrent_port_update_fails(
752751
753752 PORTS = await node_ports_v2 .ports (
754753 user_id = user_id ,
755- project_id = ProjectIDStr ( project_id ) ,
754+ project_id = project_id ,
756755 node_uuid = node_uuid ,
757756 r_clone_settings = option_r_clone_settings ,
758757 )
@@ -841,7 +840,7 @@ async def test_batch_update_inputs_outputs(
841840
842841 PORTS = await node_ports_v2 .ports (
843842 user_id = user_id ,
844- project_id = ProjectIDStr ( project_id ) ,
843+ project_id = project_id ,
845844 node_uuid = node_uuid ,
846845 r_clone_settings = option_r_clone_settings ,
847846 )
0 commit comments