def test_projectnametokenizer(input, expected): from devpi_web.views import batch_list if isinstance(expected, list): assert batch_list(*input) == expected else: with pytest.raises(expected): batch_list(*input)