1
0
Fork 0
mirror of https://github.com/dragonflydb/dragonfly.git synced 2024-12-14 11:58:02 +00:00
dragonflydb-dragonfly/tests/dragonfly/management_test.py

15 lines
459 B
Python
Raw Permalink Normal View History

import pytest
import asyncio
from redis import asyncio as aioredis
from redis.exceptions import ResponseError
@pytest.mark.asyncio
async def test_config_cmd(async_client: aioredis.Redis):
with pytest.raises(ResponseError):
await async_client.config_set("foo", "bar")
await async_client.config_set("requirepass", "foobar") == "OK"
res = await async_client.config_get("*")
assert len(res) > 0
assert res["requirepass"] == "foobar"