def test_token_value_none(self):
     with self.assertRaises(ValueError):
         SubscriptionBatchRequest(None, 'broadcasts',
                                  SubscriptionActionType.ADD)
 def test_topic(self):
     request = SubscriptionBatchRequest('abc', '/topics/broadcasts',
                                        SubscriptionActionType.ADD)
     self.assertEqual(request.topic, '/topics/broadcasts')
 def test_token_value_mixed(self):
     with self.assertRaises(ValueError):
         SubscriptionBatchRequest(['abc', 2], 'broadcasts',
                                  SubscriptionActionType.ADD)
 def test_tokens_empty(self):
     with self.assertRaises(ValueError):
         SubscriptionBatchRequest([], 'broadcasts',
                                  SubscriptionActionType.ADD)
 def test_tokens(self):
     request = SubscriptionBatchRequest('abc', 'broadcasts',
                                        SubscriptionActionType.ADD)
     self.assertEqual(request.tokens, ['abc'])
 def test_action_type(self):
     with self.assertRaises(ValueError):
         SubscriptionBatchRequest('abc', 'broadcasts', -1)
 def test_action_type(self):
     SubscriptionBatchRequest('abc', 'broadcasts',
                              SubscriptionActionType.ADD)