Skip to content

Commit

Permalink
Updated tests for Redis Cache driver
Browse files Browse the repository at this point in the history
  • Loading branch information
circulon committed Jul 25, 2024
1 parent b51c580 commit ff62179
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tests/features/cache/test_redis_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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)
Expand Down

0 comments on commit ff62179

Please sign in to comment.