def test_webhook_payload(self):
     notification = UpdateMyTBANotification('typezor', 'abcd', 'efgh')
     self.assertEquals(notification.webhook_payload, None)
 def test_platform_payload(self):
     notification = UpdateMyTBANotification('typezor', 'abcd', 'efgh')
     self.assertEquals(
         notification.platform_payload.platform_payload_dict(
             PlatformPayloadType.APNS),
         {'apns-collapse-id': 'abcd_typezor_update'})
 def test_sending_device_key_empty(self):
     with self.assertRaises(ValueError):
         UpdateMyTBANotification('abc', 'def', '')
 def test_data_payload(self):
     notification = UpdateMyTBANotification('typezor', 'abcd', 'efgh')
     self.assertEquals(notification.data_payload,
                       {'sending_device_key': 'efgh'})
 def test_sending_device_key_type(self):
     with self.assertRaises(TypeError):
         UpdateMyTBANotification('abc', 'def', 200)
 def test_user_id_empty(self):
     with self.assertRaises(ValueError):
         UpdateMyTBANotification('abc', '', 'efgh')
 def test_user_id_type(self):
     with self.assertRaises(TypeError):
         UpdateMyTBANotification('abc', 200, 'efgh')
 def test_type_name_empty(self):
     with self.assertRaises(ValueError):
         UpdateMyTBANotification('', 'abcd', 'efgh')
 def test_type_name_type(self):
     with self.assertRaises(TypeError):
         UpdateMyTBANotification(200, 'abcd', 'efgh')