1
0
libpurple-to-markdown/test/test_synctech_sms.py

16 lines
753 B
Python
Raw Permalink Normal View History

2024-10-31 23:36:30 +00:00
from libpurple_to_markdown import synctech_sms
2024-11-03 16:14:43 +00:00
2024-10-31 23:36:30 +00:00
def test_normalize_phone_number():
assert synctech_sms.normalize_phone_number('+45 12 34 56 78') == '+4512345678'
assert synctech_sms.normalize_phone_number('+4512345678') == '+4512345678'
assert synctech_sms.normalize_phone_number('4512345678') == '+4512345678'
assert synctech_sms.normalize_phone_number('12345678') == '+4512345678'
assert synctech_sms.normalize_phone_number('12 34 56 78') == '+4512345678'
assert synctech_sms.normalize_phone_number('441234567890') == '+441234567890'
assert synctech_sms.normalize_phone_number('004712345678') == '+4712345678'
2024-11-03 16:14:43 +00:00
2024-11-03 16:15:03 +00:00
2024-11-03 16:14:43 +00:00
def test_dont_normalize_weird():
assert synctech_sms.normalize_phone_number('Midttrafik') == 'Midttrafik'