Add name validation

This commit is contained in:
Nitwix
2025-04-12 15:21:22 +02:00
parent c6a648a063
commit 8bc59aeae6
4 changed files with 17 additions and 4 deletions

View File

@ -19,7 +19,7 @@ def dummy_account() -> FromAccount:
postal_code="7523 05",
city="Assen",
country="Netherlands",
name="Astrid Janneke Willems",
ebanking_name="Astrid Janneke Willems",
phone_number="+31 06 34579996",
email="astrid.willems@upcmail.nl",
)

View File

@ -20,4 +20,9 @@ def test_invalid_phone_number() -> None:
dummy = dummy_account()
with pytest.raises(ValidationError):
dummy.phone_number = "This should be invalid"
dummy.phone_number = "+41 32 333 33 33"
dummy.phone_number = "+41 32 333 33 33"
def test_check_account_name_ebanking_name() -> None:
dummy = dummy_account()
with pytest.raises(ValidationError):
dummy.ebanking_name = "This is not the same as the account name"