(tdata)
| 3 | |
| 4 | |
| 5 | def test_view_image(tdata): |
| 6 | for img in [ |
| 7 | "mitmproxy/data/image.png", |
| 8 | "mitmproxy/data/image.gif", |
| 9 | "mitmproxy/data/all.jpeg", |
| 10 | "mitmproxy/data/image.ico", |
| 11 | ]: |
| 12 | with open(tdata.path(img), "rb") as f: |
| 13 | desc = image.prettify(f.read(), Metadata()) |
| 14 | assert img.split(".")[-1].upper() in desc |
| 15 | |
| 16 | assert image.prettify(b"flibble", Metadata()) == ("# Unknown Image\n") |
| 17 | |
| 18 | |
| 19 | def test_render_priority(): |