If no text but blob is present, base64-decode the blob.
(self)
| 458 | assert AppHostServer._extract_html(resource) == "<html>nested</html>" |
| 459 | |
| 460 | def test_blob_fallback(self): |
| 461 | """If no text but blob is present, base64-decode the blob.""" |
| 462 | html = "<html>blob content</html>" |
| 463 | b64 = base64.b64encode(html.encode()).decode() |
| 464 | resource = {"contents": [{"blob": b64}]} |
| 465 | assert AppHostServer._extract_html(resource) == html |
| 466 | |
| 467 | def test_non_dict_first_item_returns_empty(self): |
| 468 | """Non-dict items in contents list produce empty string.""" |
nothing calls this directly
no test coverage detected