From c2af5c5b51df75dd92fef999f7b950a6e8dc5003 Mon Sep 17 00:00:00 2001 From: Paul Nameless Date: Wed, 27 Nov 2024 18:45:21 +0100 Subject: [PATCH] Add ignore flake8 rules instead of changing asserts --- tests/test_encrypted_cookie_storage.py | 2 +- tests/test_nacl_storage.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_encrypted_cookie_storage.py b/tests/test_encrypted_cookie_storage.py index c5cdfc98..bd7d5f5c 100644 --- a/tests/test_encrypted_cookie_storage.py +++ b/tests/test_encrypted_cookie_storage.py @@ -37,7 +37,7 @@ def create_app( def decrypt(fernet: Fernet, cookie_value: str) -> Dict[str, Any]: - assert isinstance(cookie_value, str) + assert type(cookie_value) == str # noqa: E721 cookie_value = fernet.decrypt(cookie_value.encode("utf-8")).decode("utf-8") return cast(Dict[str, Any], json.loads(cookie_value)) diff --git a/tests/test_nacl_storage.py b/tests/test_nacl_storage.py index 594f54e7..61e941d8 100644 --- a/tests/test_nacl_storage.py +++ b/tests/test_nacl_storage.py @@ -44,7 +44,7 @@ def create_app( def decrypt(secretbox: nacl.secret.SecretBox, cookie_value: str) -> Any: - assert isinstance(cookie_value, str) + assert type(cookie_value) == str # noqa: E721 return json.loads( secretbox.decrypt(cookie_value.encode("utf-8"), encoder=Base64Encoder).decode( "utf-8"