Initial clean history
CI/CD / Test (push) Failing after 4m32s
CI/CD / Deploy (push) Has been skipped

This commit is contained in:
User
2026-05-11 16:46:25 +03:00
commit bf89e671d8
33 changed files with 1333 additions and 0 deletions
View File
View File
View File
+24
View File
@@ -0,0 +1,24 @@
import pytest
from core.validator import validate_fio, validate_phone, parse_time
def test_fio_valid():
res = validate_fio("Иванов Иван Иванович")
assert res.is_valid
assert res.value == "Иванов Иван Иванович"
def test_fio_invalid():
res = validate_fio("Иванов Иван")
assert not res.is_valid
def test_phone_valid():
res = validate_phone("+7 (912) 345-67-89")
assert res.is_valid
assert "912" in res.value
def test_phone_clean():
res = validate_phone("89123456789")
assert res.is_valid
def test_parse_time():
res = parse_time("завтра в 15:00")
assert res.is_valid