orjson test and doc

This commit is contained in:
huangsong
2022-01-21 10:03:00 +08:00
parent d55a29c040
commit 6297846819
2 changed files with 39 additions and 1 deletions

View File

@ -1,3 +1,4 @@
import orjson
import json
from ormar.queryset.utils import to_str
@ -5,6 +6,9 @@ from ormar.queryset.utils import to_str
def test_to_str():
expected_str = "[]"
val = orjson.dumps([])
assert expected_str == to_str(val)
val = json.dumps([])
assert expected_str == to_str(val)