Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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"
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"
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"