예제 #1
0
 def test_insufficient_funds(self):
     try:
         test_client = GreenSMS(user='******', password='******')
         test_client.sms.send(
             to=random_phone(), txt='Test Message')
     except Exception as e:
         self.assertEqual(e.error, 'Insufficient funds')
예제 #2
0
    def test_send(self):
        dict_params = {
            'to': random_phone(),
            'txt': 'Test Message Hampshire',
            'from': 'PyTest',
            'tag': 'PyTest',
            'hidden': 'Hampshire'
        }

        response = client.sms.send(**dict_params)
        self.assertIn('request_id', response)
        self.__class__.request_id = response.request_id
예제 #3
0
 def test_send(self):
     response = client.voice.send(to=random_phone(), txt='1200', lang='en')
     self.assertIn('request_id', response)
     self.__class__.request_id = response.request_id
예제 #4
0
 def test_send(self):
     response = client.hlr.send(to=random_phone(79260000111, 79260999999))
     self.assertIn('request_id', response)
     self.__class__.request_id = response.request_id
예제 #5
0
 def test_status(self):
     time.sleep(2)
     request_id = self.__class__.request_id
     response = client.hlr.status(id=request_id, to=random_phone())
     self.assertIn('status', response)
예제 #6
0
 def test_send(self):
     response = client.pay.send(to=random_phone(), amount=10, tag='PyTest')
     self.assertIn('request_id', response)
     self.__class__.request_id = response.request_id
예제 #7
0
 def test_send(self):
     response = client.call.send(to=random_phone())
     keys_set = set(response.keys())
     self.assertTrue({'request_id', 'code'}.issubset(keys_set))
     self.__class__.request_id = response.request_id