pyinfra/test/unit_tests/server/dispatcher_test.py
Matthias Bisping 132a1a1b50 renaming
2022-05-06 23:46:21 +02:00

12 lines
399 B
Python

import pytest
from pyinfra.server.dispatcher.dispatchers.rest import RestDispatcher
@pytest.mark.parametrize("batched", [True, False])
@pytest.mark.parametrize("item_type", ["string", "image", "pdf"])
def test_rest_sender(endpoint, packages, server_process):
dispatcher = RestDispatcher(endpoint)
responses = dispatcher(packages)
assert all((r.status_code == 200 for r in responses))