Spaces:
Sleeping
Sleeping
File size: 508 Bytes
0f8d56c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | import pytest
from app.domain.reference_normalization import normalize_reference
@pytest.mark.unit
@pytest.mark.parametrize(
("raw", "expected"),
[
("a12", "12"),
("A12", "A12"),
("aA12", "A12"),
("a", None),
("", None),
(None, None),
(" a12 ", "12"),
("12345", "12345"),
("aa12", "a12"),
],
)
def test_normalize_reference(raw: str | None, expected: str | None) -> None:
assert normalize_reference(raw) == expected
|