@@ -655,14 +655,15 @@ def test_verify_session_cookie_revoked(new_user, api_key):
655655
656656def test_verify_session_cookie_tolerance (new_user , api_key ):
657657 expired_session_cookie = auth .create_session_cookie (
658- _sign_in (auth .create_custom_token (new_user .uid ), api_key ),
658+ _sign_in (auth .create_custom_token (new_user .uid ), api_key ),
659659 expires_in = datetime .timedelta (seconds = 3 )
660660 )
661661 time .sleep (3 )
662662 # Verify the session cookie with a tolerance of 0 seconds. This should
663663 # raise an exception because the cookie is expired.
664664 with pytest .raises (auth .InvalidSessionCookieError ) as excinfo :
665- auth .verify_session_cookie (expired_session_cookie , check_revoked = False , clock_skew_seconds = 0 )
665+ auth .verify_session_cookie (expired_session_cookie , check_revoked = False ,
666+ clock_skew_seconds = 0 )
666667 assert str (excinfo .value ) == 'The Firebase session cookie is expired.'
667668
668669 # Verify the session cookie with a tolerance of 2 seconds. This should
@@ -671,22 +672,24 @@ def test_verify_session_cookie_tolerance(new_user, api_key):
671672
672673def test_verify_session_cookie_clock_skew_seconds_range (new_user , api_key ):
673674 expired_session_cookie = auth .create_session_cookie (
674- _sign_in (auth .create_custom_token (new_user .uid ), api_key ),
675+ _sign_in (auth .create_custom_token (new_user .uid ), api_key ),
675676 expires_in = datetime .timedelta (seconds = 3 )
676677 )
677678 # Verify the session cookie with a tolerance of 0 seconds. This should
678679 # raise an exception because the cookie is expired.
679680 with pytest .raises (ValueError ) as excinfo :
680- auth .verify_session_cookie (expired_session_cookie , check_revoked = False , clock_skew_seconds = - 1 )
681+ auth .verify_session_cookie (
682+ expired_session_cookie , check_revoked = False , clock_skew_seconds = - 1 )
681683 assert str (excinfo .value ) == 'clock_skew_seconds must be between 0 and 60.'
682684 with pytest .raises (ValueError ) as excinfo :
683- auth .verify_session_cookie (expired_session_cookie , check_revoked = False , clock_skew_seconds = 61 )
685+ auth .verify_session_cookie (
686+ expired_session_cookie , check_revoked = False , clock_skew_seconds = 61 )
684687 assert str (excinfo .value ) == 'clock_skew_seconds must be between 0 and 60.'
685688
686689 # Verify the session cookie with a tolerance of 2 seconds. This should
687690 # not raise an exception because the cookie is within the tolerance.
688691 auth .verify_session_cookie (expired_session_cookie , check_revoked = False , clock_skew_seconds = 2 )
689-
692+
690693
691694def test_verify_session_cookie_disabled (new_user , api_key ):
692695 custom_token = auth .create_custom_token (new_user .uid )
0 commit comments