mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-08-04 00:14:11 +02:00
parent
ce918195a4
commit
3d041d34d5
4 changed files with 38 additions and 7 deletions
|
|
@ -922,3 +922,10 @@ def test_create_with_nested_bytes(fresh_db):
|
|||
record = {"id": 1, "data": {"foo": b"bytes"}}
|
||||
fresh_db["t"].insert(record)
|
||||
assert [{"id": 1, "data": '{"foo": "b\'bytes\'"}'}] == list(fresh_db["t"].rows)
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"input,expected", [("hello", "'hello'"), ("hello'there'", "'hello''there'''")]
|
||||
)
|
||||
def test_quote(fresh_db, input, expected):
|
||||
assert fresh_db.quote(input) == expected
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue