diff --git a/test/exploration_tests/partial_response_test.py b/test/exploration_tests/partial_response_test.py index f02a671..d251f67 100644 --- a/test/exploration_tests/partial_response_test.py +++ b/test/exploration_tests/partial_response_test.py @@ -5,7 +5,7 @@ from typing import Iterable import pytest import requests -from funcy import curry, rcompose, compose +from funcy import curry, rcompose, compose, lmap from test.utils.server import bytes_to_string, string_to_bytes @@ -41,8 +41,8 @@ def send_partial_request(url, input_data: Iterable[bytes], metadata): @pytest.mark.parametrize("item_type", ["string"]) -def test_sending_partial_request(url, data_items, metadata): - assert list(send_partial_request(f"{url}/process", data_items, metadata)) == [b"CONTENT"] * 7 +def test_sending_partial_request(url, data_items, metadata, operation): + assert list(send_partial_request(f"{url}/process", data_items, metadata)) == lmap(operation, data_items) @pytest.fixture diff --git a/test/fixtures/input.py b/test/fixtures/input.py index 6a8670a..50b6605 100644 --- a/test/fixtures/input.py +++ b/test/fixtures/input.py @@ -14,4 +14,4 @@ def data(data_type, pdf): @pytest.fixture def data_items(item_type): if item_type == "string": - return repeat(b"content", 7) + return list(repeat(b"content", 7))