refactoring; made test dynamic relative to import

This commit is contained in:
Matthias Bisping 2022-04-27 14:15:47 +02:00
parent e58addf8c4
commit fa4e5e5e0e
2 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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))