def test_unsubscribe(self):
     s = push.Subscription()
     s.headers[push.UNSUBSCRIBE] = 'my_header'
     self.assertEqual('my_header', s.unsubscribe)
 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))
 def test_event_type(self):
     s = push.Subscription()
     s.headers[push.EVENT_TYPE] = 'my_header'
     self.assertEqual('my_header', s.event_type)
 def test_client_token(self):
     s = push.Subscription()
     s.headers[push.CLIENT_TOKEN] = 'my_header'
     self.assertEqual('my_header', s.client_token)
 def test_topic_uri(self):
     s = push.Subscription()
     s.headers[push.TOPIC_URI] = 'my_header'
     self.assertEqual('my_header', s.topic_uri)
 def test_subscription_id(self):
     s = push.Subscription()
     s.headers[push.SUBSCRIPTION_ID] = 'my_header'
     self.assertEqual('my_header', s.subscription_id)
 def test_create(self):
     s = push.Subscription()
     self.assertEqual('', s.client_token)