Exemplo n.º 1
0
 def test_sendSMS_no_credit (self):
     processor =  SingularService ()
     try:
         retcode = processor.sendSMS (WebServiceTests.username, WebServiceTests.password,
         'AccessNoPurchase', 'foo', 'bar', datetime.datetime.now())
     except OutOfCredit:
         self.assertTrue
     else:
         self.fail('')
Exemplo n.º 2
0
 def test_sendSMS (self):
     processor =  SingularService ()
     retcode = processor.sendSMS (WebServiceTests.username, WebServiceTests.password,
         'AccessWithPurchase', 'foo', 'bar', datetime.datetime.now())
     self.assertEqual (retcode, 3)
Exemplo n.º 3
0
 def test_sendSMS_wrong_account (self):
     processor =  SingularService ()
     retcode = processor.sendSMS (WebServiceTests.username, WebServiceTests.password,
         'wrongAccount', 'foo', 'bar', datetime.datetime.now())
     self.assertEqual (retcode, Customer.WRONG_ACCOUNT)
Exemplo n.º 4
0
 def test_sendSMS_wrong_password (self):
     processor =  SingularService ()
     retcode = processor.sendSMS (WebServiceTests.wrong_username, WebServiceTests.wrong_password,
         'whatever', 'foo', 'bar', datetime.datetime.now())
     self.assertEqual (retcode, Customer.WRONG_USERNAME_OR_PASSWORD)