From a6e4a774e0aa07c09e492db6934f2bad0de603ac Mon Sep 17 00:00:00 2001 From: sadnub Date: Thu, 14 Apr 2022 18:03:39 -0400 Subject: [PATCH] fix tests --- api/tacticalrmm/tacticalrmm/cache.py | 6 ++++++ api/tacticalrmm/tacticalrmm/test.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/api/tacticalrmm/tacticalrmm/cache.py b/api/tacticalrmm/tacticalrmm/cache.py index fd3d5ef1..feab416b 100644 --- a/api/tacticalrmm/tacticalrmm/cache.py +++ b/api/tacticalrmm/tacticalrmm/cache.py @@ -1,4 +1,5 @@ from django.core.cache.backends.redis import RedisCache +from django.core.cache.backends.dummy import DummyCache from typing import Optional @@ -8,3 +9,8 @@ class TacticalRedisCache(RedisCache): if keys: self._cache.delete_many(keys) + + +class TacticalDummyCache(DummyCache): + def delete_many_pattern(self, pattern: str, version: Optional[int] = None) -> None: + pass diff --git a/api/tacticalrmm/tacticalrmm/test.py b/api/tacticalrmm/tacticalrmm/test.py index 52d1e1cd..93907901 100644 --- a/api/tacticalrmm/tacticalrmm/test.py +++ b/api/tacticalrmm/tacticalrmm/test.py @@ -18,7 +18,7 @@ if TYPE_CHECKING: TEST_CACHE = { "default": { - "BACKEND": "django.core.cache.backends.dummy.DummyCache", + "BACKEND": "tacticalrmm.cache.TacticalDummyCache", } }