aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/bot/utils/test_redis_cache.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/bot/utils/test_redis_cache.py b/tests/bot/utils/test_redis_cache.py
index dbbaef018..7405487ed 100644
--- a/tests/bot/utils/test_redis_cache.py
+++ b/tests/bot/utils/test_redis_cache.py
@@ -207,3 +207,11 @@ class RedisCacheTests(unittest.IsolatedAsyncioTestCase):
# This should convert the type into a float.
await self.redis.decrement("entropic", -2.5)
self.assertEqual(await self.redis.get("entropic"), 7.5)
+
+ # Let's test that they raise the right errors
+ with self.assertRaises(KeyError):
+ await self.redis.increment("doesn't_exist!")
+
+ await self.redis.set("stringthing", "stringthing")
+ with self.assertRaises(TypeError):
+ await self.redis.increment("stringthing")