1
0
mirror of https://github.com/home-assistant/core.git synced 2025-06-20 13:07:09 +00:00
core/tests/auth/test_jwt_wrapper.py
2023-03-22 16:03:41 -10:00

13 lines
371 B
Python

"""Tests for the Home Assistant auth jwt_wrapper module."""
import jwt
import pytest
from homeassistant.auth import jwt_wrapper
async def test_reject_access_token_with_impossible_large_size() -> None:
"""Test rejecting access tokens with impossible sizes."""
with pytest.raises(jwt.DecodeError):
jwt_wrapper.unverified_hs256_token_decode("a" * 10000)