How to use the iredis.renders._ensure_str function in iredis

To help you get started, we’ve selected a few iredis examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github laixintao / iredis / tests / test_render_functions.py View on Github external
def test_ensure_str_bytes():
    assert renders._ensure_str(b"hello world") == r"hello world"
    assert renders._ensure_str(b"hello'world") == r"hello'world"
    assert renders._ensure_str("你好".encode()) == r"\xe4\xbd\xa0\xe5\xa5\xbd"
github laixintao / iredis / tests / test_render_functions.py View on Github external
def test_ensure_str_bytes():
    assert renders._ensure_str(b"hello world") == r"hello world"
    assert renders._ensure_str(b"hello'world") == r"hello'world"
    assert renders._ensure_str("你好".encode()) == r"\xe4\xbd\xa0\xe5\xa5\xbd"
github laixintao / iredis / tests / test_render_functions.py View on Github external
def test_ensure_str_bytes():
    assert renders._ensure_str(b"hello world") == r"hello world"
    assert renders._ensure_str(b"hello'world") == r"hello'world"
    assert renders._ensure_str("你好".encode()) == r"\xe4\xbd\xa0\xe5\xa5\xbd"