dragonfly/tests/fakeredis/test/test_general.py
2024-08-22 22:30:42 +03:00

16 lines
387 B
Python

import pytest
import redis
from test.testtools import raw_command
def test_asyncioio_is_used():
"""Redis 4.2+ has support for asyncio and should be preferred over aioredis"""
from fakeredis import aioredis
assert not hasattr(aioredis, "__version__")
def test_unknown_command(r: redis.Redis):
with pytest.raises(redis.ResponseError):
raw_command(r, "0 3 3")