From ff621796538cc90d6cf06b1440a4198008f90ca5 Mon Sep 17 00:00:00 2001 From: Kieren Eaton Date: Thu, 25 Jul 2024 12:09:42 +0800 Subject: [PATCH] Updated tests for Redis Cache driver --- tests/features/cache/test_redis_cache.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/features/cache/test_redis_cache.py b/tests/features/cache/test_redis_cache.py index 61e69c2ab..696699f6a 100644 --- a/tests/features/cache/test_redis_cache.py +++ b/tests/features/cache/test_redis_cache.py @@ -11,7 +11,7 @@ def setUp(self): self.application.make("cache") self.driver = self.application.make("cache").store("redis") - def test_can_add_file_driver(self): + def test_can_add_redis_driver(self): self.assertEqual(self.driver.add("add_key", "value"), "value") def test_can_get_driver(self): @@ -23,9 +23,13 @@ def test_can_increment(self): self.driver.put("count", "1") self.assertEqual(self.driver.get("count"), "1") self.driver.increment("count") - self.assertEqual(self.driver.get("count"), "2") + self.assertEqual(self.driver.get("count"), 2) + self.driver.increment("count", 3) + self.assertEqual(self.driver.get("count"), 5) self.driver.decrement("count") - self.assertEqual(self.driver.get("count"), "1") + self.assertEqual(self.driver.get("count"), 4) + self.driver.decrement("count", 2) + self.assertEqual(self.driver.get("count"), 2) def test_will_not_get_expired(self): self.driver.put("expire", "1", 1)