# tests app_sirene

from django.test import TestCase

from app_sirene.sms import sms_check_valid_number


# --------------------------------------------------
# SMS function
# --------------------------------------------------
class SMSTest(TestCase):
    def test_sms_regexp(self):

        r = sms_check_valid_number("123456789")
        self.assertTrue(r)

        r = sms_check_valid_number("+(465) 323 44 55 66 77 88")
        self.assertTrue(r)

        r = sms_check_valid_number("")
        self.assertFalse(r)

        r = sms_check_valid_number("a")
        self.assertFalse(r)
