refactoring; made test dynamic relative to import
This commit is contained in:
parent
e58addf8c4
commit
fa4e5e5e0e
@ -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
|
||||
|
||||
2
test/fixtures/input.py
vendored
2
test/fixtures/input.py
vendored
@ -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))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user