def __init__(self, collapse_key=None, priority=None):
        """
        Args:
            collapse_key (string): Collapse key for push notification - may be None.
            priority (int): Priority for push notification - may be None.
        """
        self.collapse_key = collapse_key

        # Check that our priority looks right
        if priority:
            PlatformPriority.validate(priority)
        self.priority = priority
 def test_validate_invalid(self):
     with self.assertRaises(ValueError):
         PlatformPriority.validate(2)
 def test_validate(self):
     PlatformPriority.validate(PlatformPriority.NORMAL)
     PlatformPriority.validate(PlatformPriority.HIGH)