示例#1
0
 def test_sendsms_without_to(self):
     out = OutgoingAPI(self.client_id,self.username,self.password) 
     resp = out.sendsms(self.FROM, '',self.TEXT)
     #self.assertIn("",resp)
     print resp
示例#2
0
 def test_outgoing_without_username(self):
     out = OutgoingAPI(self.client_id,'',self.password) 
     resp = out.sendsms(self.FROM, self.TO, self.TEXT)
     self.assertIn(self.ERROR_NO_USERNAME,resp)
示例#3
0
 def test_sendsms_without_from(self):
     out = OutgoingAPI(self.client_id,self.username,self.password) 
     resp = out.sendsms('', self.TO,self.TEXT)
     print resp
示例#4
0
 def test_outgoing_without_client_id(self):
     out = OutgoingAPI('',self.username,self.password,) 
     resp = out.sendsms(self.FROM, self.TO, self.TEXT)
     self.assertIn(self.ERROR_NO_CLIENT_ID,resp)
示例#5
0
 def test_outgoing_without_password(self):
     out = OutgoingAPI(self.client_id,self.username,'') 
     resp = out.sendsms(self.FROM, self.TO, self.TEXT)
     self.assertIn(self.ERROR_UNAUTHORIZED,resp)
示例#6
0
 def test_outgoing_with_client_id_only(self):
     out = OutgoingAPI("bijay","","",None)
     resp = out.sendsms('9848848484', '9848848484', 'Hello world')
     self.assertIn('Error 1.1: 403 - Username', resp)
示例#7
0
 def test_outgoing_with_password_only(self):
     out = OutgoingAPI("","",self.password,)
     resp = out.sendsms(self.FROM, self.TO, self.TEXT)
     self.assertIn(self.ERROR_NO_USERNAME, resp)
示例#8
0
 def test_sendsms_(self):
     out = OutgoingAPI('bijay','bijay','bijay',None)
     resp = out.sendsms('9848442934','9834343434','Hello')
     print resp
示例#9
0
 def test_outgoing_with_username_only(self):
     out = OutgoingAPI("",self.username,"",)
     resp = out.sendsms(self.FROM, self.TO, self.TEXT)
     self.assertIn(self.ERROR_NO_CLIENT_ID, resp)
示例#10
0
 def test_outgoing_without_username(self):
     out = OutgoingAPI('bijay',None,'bijay',None) 
     resp = out.sendsms('9848442934', '9845454545','Hello')
     self.assertIn("Error 2: 403",resp)
示例#11
0
 def test_sendsms_without_message(self):
     out = OutgoingAPI('bijay','bijay','bijay',None) 
     resp = out.sendsms('9848442934','9834343434','')
     #self.assertIn("",resp)
     print resp
示例#12
0
 def test_outgoing_without_password(self):
     out = OutgoingAPI('bijay','bijay','',None) 
     resp = out.sendsms('9848442934', '9845454545','Hello')
     self.assertIn("Error 2: 403 - Unauthorized",resp)
示例#13
0
 def test_outgoing_without_client(self):
     out = OutgoingAPI('','bijay','bijay',None) 
     resp = out.sendsms('9848442934', '9845454545','Hello')
     self.assertIn("Error 1: 403 - You must",resp)
示例#14
0
 def test_outgoing_with_password_only(self):
     out = OutgoingAPI("","","bijay",None)
     resp = out.sendsms('9848848484', '9848848484', 'Hello world')
     self.assertIn("Error 1.1: 403 - Username isn't supplied", resp)
示例#15
0
 def test_sendsms_without_message(self):
     out = OutgoingAPI(self.client_id,self.username,self.password) 
     resp = out.sendsms(self.FROM,self.TO,'')
     print resp
示例#16
0
 def test_outgoing_with_client_id_only(self):
     out = OutgoingAPI(self.client_id,"","")
     resp = out.sendsms(self.FROM, self.TO, self.TEXT)
     self.assertIn(self.ERROR_NO_USERNAME, resp)
示例#17
0
 def test_sendsms_(self):
     out = OutgoingAPI(self.client_id,self.username,self.password)
     resp = out.sendsms(self.FROM, self.TO, self.TEXT)
     print resp
示例#18
0
 def test_outgoing_with_username_only(self):
     out = OutgoingAPI("",'bijay',"",None)
     resp = out.sendsms('9848848484', '9848848484', 'Hello world')
     self.assertIn('Error 1: 403 - You must be someone', resp)