def test_prepare_redis(self):
delattr(settings, 'CACHEOPS_REDIS')
HEARTBEAT = {'checkers': ['heartbeat.checkers.redis_status']}
with pytest.raises(ImproperlyConfigured) as e:
heartbeat_settings.prepare_redis(HEARTBEAT)
assert 'Missing CACHEOPS_REDIS in project settings' in str(e)
评论列表
文章目录