@@ -184,7 +184,7 @@ async def test_list_inputs(
184184 )
185185
186186 response = await client .get (f"{ url } " )
187- data , error = await assert_status (response , status .HTTP_200_OK )
187+ data , _ = await assert_status (response , status .HTTP_200_OK )
188188 TypeAdapter (list [ServiceInputGet ]).validate_python (data )
189189
190190
@@ -212,10 +212,47 @@ async def test_get_inputs(
212212 input_key = next (iter (service_payload ["inputs" ].keys ())),
213213 )
214214 response = await client .get (f"{ url } " )
215- data , error = await assert_status (response , status .HTTP_200_OK )
215+ data , _ = await assert_status (response , status .HTTP_200_OK )
216216 ServiceInputGet .model_validate (data )
217217
218218
219+ @pytest .mark .parametrize (
220+ "user_role" ,
221+ [UserRole .USER ],
222+ )
223+ async def test_get_compatible_inputs_given_source_outputs (
224+ client : TestClient , logged_user : UserInfoDict , aioresponses_mocker : AioResponsesMock
225+ ):
226+ url_pattern = re .compile (r"http://catalog:8000/v0/services/.*" )
227+ service_payload = ServiceGetV2 .model_json_schema ()["examples" ][0 ]
228+ for _ in range (2 ):
229+ aioresponses_mocker .get (
230+ url_pattern ,
231+ status = status .HTTP_200_OK ,
232+ payload = service_payload ,
233+ )
234+
235+ service_key = "simcore/services/comp/itis/sleeper"
236+ service_version = "0.1.0"
237+ assert client .app and client .app .router
238+ url = (
239+ client .app .router ["get_compatible_inputs_given_source_output" ]
240+ .url_for (
241+ service_key = urllib .parse .quote (service_key , safe = "" ),
242+ service_version = service_version ,
243+ )
244+ .with_query (
245+ {
246+ "fromService" : "simcore/services/comp/itis/sleeper" ,
247+ "fromVersion" : "0.1.0" ,
248+ "fromOutput" : "output_1" ,
249+ }
250+ )
251+ )
252+ response = await client .get (f"{ url } " )
253+ _ , _ = await assert_status (response , status .HTTP_200_OK )
254+
255+
219256@pytest .mark .parametrize (
220257 "user_role" ,
221258 [UserRole .USER ],
0 commit comments