import pytest from funcy import lmap from pyinfra.server.rest import process_eagerly from pyinfra.server.utils import unpack @pytest.mark.parametrize("batched", [True, False]) @pytest.mark.parametrize("item_type", ["pdf", "string", "image"]) def test_sending_partial_request(url, input_data_items, metadata, operation, target_data_items, server_process): output = lmap(unpack, process_eagerly(f"{url}/process", input_data_items, metadata)) assert output == target_data_items