mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-09-09 18:14:09 +02:00
Serialize JSON with non-JSON values, closes #102
This commit is contained in:
parent
344e9573ca
commit
d56029549a
2 changed files with 10 additions and 2 deletions
|
|
@ -847,3 +847,9 @@ def test_create_with_a_null_column(fresh_db):
|
|||
record = {"name": "Name", "description": None}
|
||||
fresh_db["t"].insert(record)
|
||||
assert [record] == list(fresh_db["t"].rows)
|
||||
|
||||
|
||||
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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue