1
0
Fork 0
iredis/tests/cli_tests/test_shell_pipeline.py
Daniel Baumann c0bb48d3f7
Adding upstream version 1.9.4.
Signed-off-by: Daniel Baumann <daniel@debian.org>
2025-02-09 17:03:45 +01:00

21 lines
571 B
Python

import pexpect
def test_running_disable_shell_pipeline():
cli = pexpect.spawn("iredis -n 15 --no-shell", timeout=2)
cli.expect("127.0.0.1")
cli.sendline("set foo hello")
cli.expect("OK")
cli.sendline("get foo | grep w")
cli.expect(r"hello")
cli.close()
def test_running_disable_shell_pipeline_with_decode_option():
cli = pexpect.spawn("iredis -n 15 --decode=utf-8", timeout=2)
cli.expect("127.0.0.1")
cli.sendline("set foo hello")
cli.expect("OK")
cli.sendline("get foo | cat")
cli.expect(r"hello")
cli.close()