Exemplo n.º 1
0
 def test_unsubscribe(self):
     s = push.Subscription()
     s.headers[push.UNSUBSCRIBE] = 'my_header'
     self.assertEqual('my_header', s.unsubscribe)
Exemplo n.º 2
0
 def test_verify_bad_token(self):
     s = push.Subscription()
     s.headers['X-Goog-Client-Token'] = '321'
     notification_headers = {'x-goog-client-token': '123'}
     self.assertFalse(s.verify(notification_headers))
Exemplo n.º 3
0
 def test_event_type(self):
     s = push.Subscription()
     s.headers[push.EVENT_TYPE] = 'my_header'
     self.assertEqual('my_header', s.event_type)
Exemplo n.º 4
0
 def test_client_token(self):
     s = push.Subscription()
     s.headers[push.CLIENT_TOKEN] = 'my_header'
     self.assertEqual('my_header', s.client_token)
Exemplo n.º 5
0
 def test_topic_uri(self):
     s = push.Subscription()
     s.headers[push.TOPIC_URI] = 'my_header'
     self.assertEqual('my_header', s.topic_uri)
Exemplo n.º 6
0
 def test_subscription_id(self):
     s = push.Subscription()
     s.headers[push.SUBSCRIPTION_ID] = 'my_header'
     self.assertEqual('my_header', s.subscription_id)
Exemplo n.º 7
0
 def test_create(self):
     s = push.Subscription()
     self.assertEqual('', s.client_token)