MCPcopy Create free account
hub / github.com/sammchardy/python-binance / test_multiple_objects

Function test_multiple_objects

tests/utils.py:1–16  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

1def 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)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…