Skip to content

Commit a9b01a0

Browse files
committed
Fix unit test
1 parent b88b90e commit a9b01a0

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

django_mongodb_backend/cache.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,6 @@ class CacheEntry:
5757

5858

5959
class MongoDBCache(BaseDatabaseCache):
60-
def __init__(self, *args, **options):
61-
super().__init__(*args, **options)
62-
# don't know If I can set the capped collection here.
63-
6460
def create_indexes(self):
6561
self.collection.create_index("expires_at", expireAfterSeconds=0)
6662
self.collection.create_index("key", unique=True)

tests/cache_/tests.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ def test_cull(self):
476476
self._perform_cull_test("cull", 50, 29)
477477

478478
def test_zero_cull(self):
479-
self._perform_cull_test("zero_cull", 50, 19)
479+
self._perform_cull_test("zero_cull", 50, 18)
480480

481481
def test_cull_delete_when_store_empty(self):
482482
try:
@@ -551,7 +551,7 @@ def key_func(key, *args): # noqa: ARG001
551551
key = "a" * 249
552552
expected_warning = (
553553
"Cache key will cause errors if used with memcached: "
554-
f"{key_func(key)} (longer than {250})"
554+
f"'{key_func(key)}' (longer than 250)"
555555
)
556556
self._perform_invalid_key_test(key, expected_warning, key_func=key_func)
557557

0 commit comments

Comments
 (0)