pyinfra/test/exploration_tests/partial_response_test.py
Matthias Bisping 35045128b4 renaming
2022-05-04 13:51:05 +02:00

12 lines
468 B
Python

import pytest
from funcy import lmap
from pyinfra.server.rest import process_eagerly, 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 == lmap(unpack, target_data_items)