summaryrefslogtreecommitdiff
path: root/tests/test_asyncio/test_pipeline.py
diff options
context:
space:
mode:
authorUtkarsh Gupta <utkarshgupta137@gmail.com>2022-05-30 21:45:45 +0530
committerGitHub <noreply@github.com>2022-05-30 19:15:45 +0300
commitbac33d4a92892ca7982b461347151bff5a661f0d (patch)
tree976d5dafcc2b3a1c4e129e1da439f1b7bdacacbd /tests/test_asyncio/test_pipeline.py
parentc54dfa49dda6a7b3389dc230726293af3ffc68a3 (diff)
downloadredis-py-bac33d4a92892ca7982b461347151bff5a661f0d.tar.gz
async_cluster: add pipeline support (#2199)
Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com>
Diffstat (limited to 'tests/test_asyncio/test_pipeline.py')
-rw-r--r--tests/test_asyncio/test_pipeline.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/test_asyncio/test_pipeline.py b/tests/test_asyncio/test_pipeline.py
index 50a1051..dfeb664 100644
--- a/tests/test_asyncio/test_pipeline.py
+++ b/tests/test_asyncio/test_pipeline.py
@@ -8,8 +8,8 @@ from .conftest import wait_for_command
pytestmark = pytest.mark.asyncio
-@pytest.mark.onlynoncluster
class TestPipeline:
+ @pytest.mark.onlynoncluster
async def test_pipeline_is_true(self, r):
"""Ensure pipeline instances are not false-y"""
async with r.pipeline() as pipe:
@@ -52,7 +52,6 @@ class TestPipeline:
await pipe.execute()
assert len(pipe) == 0
- @pytest.mark.onlynoncluster
async def test_pipeline_no_transaction(self, r):
async with r.pipeline(transaction=False) as pipe:
pipe.set("a", "a1").set("b", "b1").set("c", "c1")
@@ -61,6 +60,7 @@ class TestPipeline:
assert await r.get("b") == b"b1"
assert await r.get("c") == b"c1"
+ @pytest.mark.onlynoncluster
async def test_pipeline_no_transaction_watch(self, r):
await r.set("a", 0)
@@ -72,6 +72,7 @@ class TestPipeline:
pipe.set("a", int(a) + 1)
assert await pipe.execute() == [True]
+ @pytest.mark.onlynoncluster
async def test_pipeline_no_transaction_watch_failure(self, r):
await r.set("a", 0)
@@ -375,7 +376,7 @@ class TestPipeline:
async def test_pipeline_get(self, r):
await r.set("a", "a1")
async with r.pipeline() as pipe:
- await pipe.get("a")
+ pipe.get("a")
assert await pipe.execute() == [b"a1"]
@pytest.mark.onlynoncluster