Example #1
0
    def test_get_restore_method_for_claim_not_before_date(self):
        """
            Test getting the restore method for the not-before date.

            Expected Result: The method `restoration.restore_timestamp_to_datetime()` is returned.
        """

        restore_method = EasyJWT._get_restore_method_for_claim(
            'not_before_date')
        self.assertEqual(restore_timestamp_to_datetime, restore_method)
Example #2
0
    def test_get_restore_method_for_claim_none(self):
        """
            Test getting the restore method for a claim that has no such method.

            Expected Result: `None`.
        """

        restore_method = EasyJWT._get_restore_method_for_claim(
            'claim_with_no_restore_method')
        self.assertIsNone(restore_method)