replace inefficient use of to_jsonable_python (#545)
This commit is contained in:
parent
b4c7db6a50
commit
697b6e8e05
2 changed files with 11 additions and 17 deletions
|
|
@ -100,7 +100,7 @@ class TestFunctionResource:
|
|||
fn=lambda: MyModel(name="test"),
|
||||
)
|
||||
content = await resource.read()
|
||||
assert content == '{"name": "test"}'
|
||||
assert content == '{\n "name": "test"\n}'
|
||||
|
||||
@pytest.mark.anyio
|
||||
async def test_custom_type_conversion(self):
|
||||
|
|
|
|||
|
|
@ -185,4 +185,4 @@ class TestResourceTemplate:
|
|||
|
||||
assert isinstance(resource, FunctionResource)
|
||||
content = await resource.read()
|
||||
assert content == "hello"
|
||||
assert content == '"hello"'
|
||||
|
|
|
|||
Loading…
Reference in a new issue