@@ -17,7 +17,8 @@ def client(request):
1717
1818
1919def _test_validation (client : httpx .Client , url : str , params : dict ,
20- query : ValidationExpression , check_in_all_projects : bool = False ) -> None :
20+ query : ValidationExpression , check_in_collection : bool = False ,
21+ check_in_all_projects : bool = False ) -> None :
2122 results = client .get (url = url , params = params )
2223 results .raise_for_status ()
2324 json_results = results .json ()
@@ -26,7 +27,8 @@ def _test_validation(client: httpx.Client, url: str, params: dict,
2627 matching_terms = list ()
2728 elif not isinstance (matching_terms , list ):
2829 matching_terms = [matching_terms ]
29- check_validation (query , cast (list [MatchingTerm ], matching_terms ), check_in_all_projects )
30+ check_validation (query , cast (list [MatchingTerm ], matching_terms ), check_in_collection ,
31+ check_in_all_projects )
3032
3133
3234def test_valid_term_all_projects (client , val_query ) -> None :
@@ -38,7 +40,7 @@ def test_valid_term_all_projects(client, val_query) -> None:
3840def test_valid_term_in_project (client , val_query ) -> None :
3941 url = '/term'
4042 params = {'value' : val_query .value , 'project_id' : val_query .item .project_id }
41- _test_validation (client = client , url = url , params = params , query = val_query )
43+ _test_validation (client = client , url = url , params = params , query = val_query , check_in_collection = True )
4244
4345
4446def test_valid_term_in_collection (client , val_query ) -> None :
0 commit comments