|
@@ -22,6 +22,12 @@ class TwilioPluginSMSSplitTest(TestCase):
|
|
|
actual = split_sms_to(to)
|
|
|
assert expected == actual
|
|
|
|
|
|
+ def test_valid_split_sms_to_with_just_spaces(self):
|
|
|
+ to = "330-509-3095 (330)-509-3095 +13305093095 4045550144"
|
|
|
+ expected = {"330-509-3095", "(330)-509-3095", "+13305093095", "4045550144"}
|
|
|
+ actual = split_sms_to(to)
|
|
|
+ assert expected == actual
|
|
|
+
|
|
|
def test_valid_split_sms_to_with_no_whitespace(self):
|
|
|
to = "330-509-3095,(330)-509-3095,+13305093095,4045550144"
|
|
|
expected = {"330-509-3095", "(330)-509-3095", "+13305093095", "4045550144"}
|
|
@@ -40,6 +46,12 @@ class TwilioPluginSMSSplitTest(TestCase):
|
|
|
actual = split_sms_to(to)
|
|
|
assert expected == actual
|
|
|
|
|
|
+ def test_valid_split_sms_to_with_just_newlines(self):
|
|
|
+ to = "330-509-3095\n(330)-509-3095\n+13305093095\n\n4045550144"
|
|
|
+ expected = {"330-509-3095", "(330)-509-3095", "+13305093095", "4045550144"}
|
|
|
+ actual = split_sms_to(to)
|
|
|
+ assert expected == actual
|
|
|
+
|
|
|
def test_valid_split_sms_to_with_extra_newlines(self):
|
|
|
to = "330-509-3095\n\n\n\n\n,\n\n\n\n\n\n\n\n\n(330)-509-3095,\n\n\n\n+13305093095,\n\n4045550144"
|
|
|
expected = {"330-509-3095", "(330)-509-3095", "+13305093095", "4045550144"}
|