Пример #1
0
 def test_send(self):
     request = SubscriptionBatchRequest('abc', 'broadcasts',
                                        SubscriptionActionType.REMOVE)
     response = request.send('abcd123')
     self.assertIsNotNone(response.subscribers)
     self.assertEqual(len(response.subscribers), 1)
     self.assertIsNone(response.error)
 def test_send(self):
     request = SubscriptionBatchRequest('abc', 'broadcasts', SubscriptionActionType.REMOVE)
     response = request.send('abcd123')
     self.assertIsNotNone(response.subscribers)
     self.assertEqual(len(response.subscribers), 1)
     self.assertIsNone(response.error)
 def test_send_api_key_empty(self):
     request = SubscriptionBatchRequest('abc', 'broadcasts', SubscriptionActionType.REMOVE)
     with self.assertRaises(ValueError):
         response = request.send('')
Пример #4
0
 def test_send_api_key_empty(self):
     request = SubscriptionBatchRequest('abc', 'broadcasts',
                                        SubscriptionActionType.REMOVE)
     with self.assertRaises(ValueError):
         response = request.send('')