Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/pallets/flask
/ __html__
Method
__html__
tests/test_json.py:342–343 ·
view source on GitHub ↗
(self)
Source
from the content-addressed store, hash-verified
340
def
test_html_method():
341
class
ObjectWithHTML:
342
def
__html__(self):
343
return
"<p>test</p>"
344
345
result = json.dumps(ObjectWithHTML())
346
assert result ==
'"<p>test</p>"'
Callers
2
_default
Function · 0.80
to_json
Method · 0.80
Calls
no outgoing calls
Tested by
no test coverage detected