From ecdbb924287d3136f427ae67adf03bc7520a9bad Mon Sep 17 00:00:00 2001 From: northernSage Date: Sat, 13 Apr 2024 10:30:53 -0300 Subject: [PATCH] extend tests --- tests/test_file_system_cache.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/tests/test_file_system_cache.py b/tests/test_file_system_cache.py index ddf20442..9eda8c25 100644 --- a/tests/test_file_system_cache.py +++ b/tests/test_file_system_cache.py @@ -42,9 +42,21 @@ def __init__(self, *args, **kwargs): super().__init__(*args, hash_method=hashlib.sha256, **kwargs) +class CustomDefaultHashingMethodCache(FileSystemCache): + _default_hash_method = hashlib.sha256 + + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + + @pytest.fixture( autouse=True, - params=[FileSystemCache, CustomSerializerCache, CustomHashingMethodCache], + params=[ + FileSystemCache, + CustomSerializerCache, + CustomHashingMethodCache, + CustomDefaultHashingMethodCache, + ], ) def cache_factory(request, tmpdir): def _factory(self, *args, **kwargs):