Skip to content

Commit 03353e9

Browse files
committed
chore: update tests
1 parent 7ebc652 commit 03353e9

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

tests/test_fpnv.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,13 @@
1414

1515
"""Test cases for the firebase_admin.fpnv module."""
1616

17-
import json
18-
from datetime import time
17+
from unittest import mock
1918

2019
import jwt
2120
import pytest
22-
from unittest import mock
2321

2422
import firebase_admin
2523
from firebase_admin import fpnv
26-
from firebase_admin import _utils
2724
from tests import testutils
2825

2926
# Mock Data
@@ -114,6 +111,7 @@ def test_client_explicit_app(self):
114111

115112

116113
class TestVerifyToken:
114+
117115
@mock.patch('jwt.PyJWKClient')
118116
@mock.patch('jwt.decode')
119117
@mock.patch('jwt.get_unverified_header')
@@ -165,7 +163,8 @@ def test_verify_token_jwk_error(self, mock_header, mock_jwks_cls, client):
165163
mock_header.return_value = {'kid': 'k', 'typ': 'JWT', 'alg': 'ES256'}
166164
mock_jwks_instance = mock_jwks_cls.return_value
167165
# Simulate Key not found or other PyJWKClient error
168-
mock_jwks_instance.get_signing_key_from_jwt.side_effect = jwt.PyJWKClientError("Key not found")
166+
mock_jwks_instance.get_signing_key_from_jwt.side_effect = jwt.PyJWKClientError(
167+
"Key not found")
169168

170169
with pytest.raises(ValueError, match="Verifying FPNV token failed"):
171170
client.verify_token('token')

0 commit comments

Comments
 (0)