def test_from_number_OK(self):
     my_sms_client = SenderSMS(self.DEFAULT_SENT_FROM_NUMBER,
                               self.DEFAULT_TESTING_MODE)
     response = my_sms_client.send_sms("::: test_from_number_OK",
                                       self.DEFAULT_SENT_TO_NUMBER)
     self.assertIsNotNone(response)
     self.assertIsNotNone(response.sid)
 def test_from_number_OK(self):
     my_sms_client = SenderSMS(self.DEFAULT_SENT_FROM_NUMBER,
                               self.DEFAULT_TESTING_MODE)
     response = my_sms_client.send_sms("::: test_from_number_OK",
                                       self.DEFAULT_SENT_TO_NUMBER)
     self.assertIsNotNone(response)
     self.assertIsNotNone(response.sid)
	def test_to_number_incapable_to_receiving_sms(self):
		try:
			my_sms_client = SenderSMS(self.DEFAULT_SENT_FROM_NUMBER, self.DEFAULT_TESTING_MODE)
			response = my_sms_client.send_sms("::: test_to_number_in_blacklist", "+15005550009")
		except twilio.TwilioRestException as e:
			self.assertRaises(twilio.TwilioRestException)
			self.assertEqual(21614, e.code)
	def test_to_number_invalid_permissions(self):
		try:
			my_sms_client = SenderSMS(self.DEFAULT_SENT_FROM_NUMBER, self.DEFAULT_TESTING_MODE)
			response = my_sms_client.send_sms("::: test_to_number_invalid_permissions", "+15005550003")
		except twilio.TwilioRestException as e:
			self.assertRaises(twilio.TwilioRestException)
			self.assertEqual(21408, e.code)
	def test_to_number_cant_be_routed(self):
		try:
			my_sms_client = SenderSMS(self.DEFAULT_SENT_FROM_NUMBER, self.DEFAULT_TESTING_MODE)
			response = my_sms_client.send_sms("::: test_to_number_cant_be_routed", "+15005550002")
		except twilio.TwilioRestException as e:
			self.assertRaises(twilio.TwilioRestException)
			self.assertEqual(21612, e.code)
	def test_from_number_sms_queue_full(self):
		try:
			my_sms_client = SenderSMS("+15005550008", self.DEFAULT_TESTING_MODE)
			response = my_sms_client.send_sms("::: test_from_number_sms_queue_full", self.DEFAULT_SENT_TO_NUMBER)
		except twilio.TwilioRestException as e:
			self.assertRaises(twilio.TwilioRestException)
			self.assertEqual(21611, e.code)
	def test_from_number_not_owned_in_my_account(self):
		try:
			my_sms_client = SenderSMS("+15005550007", self.DEFAULT_TESTING_MODE)
			response = my_sms_client.send_sms("::: test_from_number_not_owned_in_my_account", self.DEFAULT_SENT_TO_NUMBER)
		except twilio.TwilioRestException as e:
			self.assertRaises(twilio.TwilioRestException)
			self.assertEqual(21606, e.code)
 def test_to_number_in_blacklist(self):
     try:
         my_sms_client = SenderSMS(self.DEFAULT_SENT_FROM_NUMBER,
                                   self.DEFAULT_TESTING_MODE)
         response = my_sms_client.send_sms(
             "::: test_to_number_in_blacklist", "+15005550004")
     except twilio.TwilioRestException as e:
         self.assertRaises(twilio.TwilioRestException)
         self.assertEqual(21610, e.code)
 def test_to_number_invalid_permissions(self):
     try:
         my_sms_client = SenderSMS(self.DEFAULT_SENT_FROM_NUMBER,
                                   self.DEFAULT_TESTING_MODE)
         response = my_sms_client.send_sms(
             "::: test_to_number_invalid_permissions", "+15005550003")
     except twilio.TwilioRestException as e:
         self.assertRaises(twilio.TwilioRestException)
         self.assertEqual(21408, e.code)
 def test_from_number_invalid(self):
     try:
         my_sms_client = SenderSMS("+15005550001",
                                   self.DEFAULT_TESTING_MODE)
         response = my_sms_client.send_sms("::: test_from_number_invalid",
                                           self.DEFAULT_SENT_TO_NUMBER)
     except twilio.TwilioRestException as e:
         self.assertRaises(twilio.TwilioRestException)
         self.assertEqual(21212, e.code)
 def test_from_number_not_owned_in_my_account(self):
     try:
         my_sms_client = SenderSMS("+15005550007",
                                   self.DEFAULT_TESTING_MODE)
         response = my_sms_client.send_sms(
             "::: test_from_number_not_owned_in_my_account",
             self.DEFAULT_SENT_TO_NUMBER)
     except twilio.TwilioRestException as e:
         self.assertRaises(twilio.TwilioRestException)
         self.assertEqual(21606, e.code)