MCPcopy
hub / github.com/mitmproxy/mitmproxy / test_simple

Function test_simple

test/mitmproxy/contentviews/test__view_xml_html.py:11–20  ·  view source on GitHub ↗
(tdata)

Source from the content-addressed store, hash-verified

9
10
11def test_simple(tdata):
12 assert xml_html.prettify(b"foo", Metadata()) == "foo\n"
13 assert xml_html.prettify(b"<html></html>", Metadata()) == "<html></html>\n"
14 assert xml_html.prettify(b"<>", Metadata()) == "<>\n"
15 assert xml_html.prettify(b"<p", Metadata()) == "<p\n"
16
17 with open(tdata.path(datadir + "simple.html")) as f:
18 input = f.read()
19 tokens = tokenize(input)
20 assert str(next(tokens)) == "Tag(<!DOCTYPE html>)"
21
22
23def test_use_text():

Callers

nothing calls this directly

Calls 5

MetadataClass · 0.90
tokenizeFunction · 0.90
prettifyMethod · 0.45
pathMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…