Skip to content

Commit

Permalink
Tune cs_CZ phone number validation (#2022)
Browse files Browse the repository at this point in the history
  • Loading branch information
george0st committed Apr 17, 2024
1 parent b7bd2a5 commit df56aa3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/providers/test_phone_number.py
Expand Up @@ -67,7 +67,7 @@ class TestCsCz:
"""Test cs_CZ phone number provider methods"""

def test_phone_number(self, faker, num_samples):
pattern: Pattern = re.compile(r"^(00420|\+420)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$")
pattern: Pattern = re.compile(r"^(00420|\+420)? ?[6-7][0-9]{2} ?[0-9]{3} ?[0-9]{3}$")
for _ in range(num_samples):
phone_number = faker.phone_number()
assert pattern.fullmatch(phone_number)
Expand Down

0 comments on commit df56aa3

Please sign in to comment.