aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/bot/utils/test_redis_cache.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/bot/utils/test_redis_cache.py b/tests/bot/utils/test_redis_cache.py
index 4f95dff03..8c1a40640 100644
--- a/tests/bot/utils/test_redis_cache.py
+++ b/tests/bot/utils/test_redis_cache.py
@@ -4,6 +4,7 @@ import unittest
import fakeredis.aioredis
from bot.utils import RedisCache
+from bot.utils.redis_cache import NoBotInstanceError, NoNamespaceError, NoParentInstanceError
from tests import helpers
@@ -260,13 +261,13 @@ class RedisCacheTests(unittest.IsolatedAsyncioTestCase):
cog = MyCog()
# Raises "No Bot instance"
- with self.assertRaises(RuntimeError):
+ with self.assertRaises(NoBotInstanceError):
await cog.cache.get("john")
# Raises "RedisCache has no namespace"
- with self.assertRaises(RuntimeError):
+ with self.assertRaises(NoNamespaceError):
await cog.other_cache.get("was")
# Raises "You must access the RedisCache instance through the cog instance"
- with self.assertRaises(RuntimeError):
+ with self.assertRaises(NoParentInstanceError):
await MyCog.cache.get("afraid")