Generic test function for validating multiple objects Args: client_response: List or iterator of objects to validate assertion_func: Function to use for asserting each object's structure
(obj_list, assertion_func)
| 1 | def test_multiple_objects(obj_list, assertion_func): |
| 2 | """ |
| 3 | Generic test function for validating multiple objects |
| 4 | |
| 5 | Args: |
| 6 | client_response: List or iterator of objects to validate |
| 7 | assertion_func: Function to use for asserting each object's structure |
| 8 | """ |
| 9 | assert obj_list is not None, "Response should not be None" |
| 10 | |
| 11 | # Handle both lists and iterators |
| 12 | objects = list(obj_list) |
| 13 | |
| 14 | # Validate each object |
| 15 | for obj in objects: |
| 16 | assertion_func(obj) |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…