import pytest @pytest.fixture def data(data_type, pdf): if data_type == "pdf": return pdf elif data_type == "bytestring": return "content".encode("latin1")