Forbid float NaN in JSON (#18757)
This commit is contained in:
1 parent
5c3a4e3d10
commit
a2386f871d
4 files changed
+28
-7
No files matched your search
@@ -10,6 +10,6 @@ async def test_invalid_json(caplog):
|
||||
view = HomeAssistantView()
|
||||
|
||||
with pytest.raises(HTTPInternalServerError):
|
||||
view.json(object)
|
||||
view.json(float("NaN"))
|
||||
|
||||
assert str(object) in caplog.text
|
||||
assert str(float("NaN")) in caplog.text
|
||||
Reference in new issue
Block a user