mirror of
https://github.com/fhswf/aki_prj23_transparenzregister.git
synced 2025-08-13 19:34:36 +02:00
refactor(data-extraction): Move date_to_iso function to string_tools
This commit is contained in:
@@ -33,3 +33,15 @@ def test_simplify_string_type_error(value: Any) -> None:
|
||||
"""Tests if the type error is thrown when the value is the wrong type."""
|
||||
with pytest.raises(TypeError):
|
||||
assert string_tools.simplify_string(value)
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
("value", "expected"),
|
||||
[
|
||||
("10.10.1111", "1111-10-10"),
|
||||
("10.10.98", "1998-10-10"),
|
||||
],
|
||||
)
|
||||
def test_transform_date_to_iso(value: str, expected: str) -> None:
|
||||
result = string_tools.transform_date_to_iso(value)
|
||||
assert result == expected
|
||||
|
Reference in New Issue
Block a user