Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 1 addition & 13 deletions tests/commands/asyncio/bitmap/test_bitop.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from aiohttp import ClientSession
from pytest import mark, raises

from tests.execute_on_http import execute_on_http
Expand Down Expand Up @@ -43,22 +42,11 @@ async def test_not_with_more_than_one_source_key(async_redis: Redis) -> None:
== 'The "NOT " operation takes only one source key as argument.'
)


@mark.asyncio
async def test_not(async_redis: Redis) -> None:
assert (
await async_redis.bitop(
"NOT", "bitop_destination_4", "string_as_bitop_source_1"
)
== 4
)

# Manually execute over the REST API because the response is not valid JSON.
async with ClientSession() as session:
async with session.post(
url=async_redis._url,
headers={"Authorization": f"Bearer {async_redis._token}"},
json=["GET", "bitop_destination_4"],
) as response:
# Prevent Python from interpreting escape characters.
assert await response.text() == r'{"result":"\x9e\x9d\x9c\x9b"}'
)