def get_response(fixture_name: str) -> Iterator[bytes]:
    """Convert a fixture file into a stream of bytes for testing."""
    content = load_fixture(fixture_name)
    for line in content.splitlines():
        yield line.encode() + b"\n"
Convert a fixture file into a stream of bytes for testing.
tests/lib/streaming/helpers.py