diff options
author | Maximilian Hils <git@maximilianhils.com> | 2016-12-10 10:19:05 +0100 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2016-12-10 10:19:05 +0100 |
commit | 293b79af9120c3fc056db60492f88e21a5610ab6 (patch) | |
tree | 6e6607d9a82d5f9c5dd772f4a147fdd4e6a9bce4 /test | |
parent | a7ba2f7b46b98d8d688706adf5b1d9495218a91d (diff) | |
download | mitmproxy-293b79af9120c3fc056db60492f88e21a5610ab6.tar.gz mitmproxy-293b79af9120c3fc056db60492f88e21a5610ab6.tar.bz2 mitmproxy-293b79af9120c3fc056db60492f88e21a5610ab6.zip |
remove lxml-dependent code
Diffstat (limited to 'test')
-rw-r--r-- | test/mitmproxy/contentviews/test_html.py | 18 | ||||
-rw-r--r-- | test/mitmproxy/contentviews/test_html_outline.py | 9 | ||||
-rw-r--r-- | test/mitmproxy/contentviews/test_xml.py | 17 |
3 files changed, 9 insertions, 35 deletions
diff --git a/test/mitmproxy/contentviews/test_html.py b/test/mitmproxy/contentviews/test_html.py deleted file mode 100644 index 8d5818e5..00000000 --- a/test/mitmproxy/contentviews/test_html.py +++ /dev/null @@ -1,18 +0,0 @@ -from mitmproxy.contentviews import html -from . import full_eval - - -def test_view_html(): - v = full_eval(html.ViewHTML()) - s = b"<html><br><br></br><p>one</p></html>" - assert v(s) - - s = b"gobbledygook" - assert not v(s) - - -def test_view_html_outline(): - v = full_eval(html.ViewHTMLOutline()) - s = b"<html><br><br></br><p>one</p></html>" - assert v(s) - assert v(b'\xfe') diff --git a/test/mitmproxy/contentviews/test_html_outline.py b/test/mitmproxy/contentviews/test_html_outline.py new file mode 100644 index 00000000..d9ccc406 --- /dev/null +++ b/test/mitmproxy/contentviews/test_html_outline.py @@ -0,0 +1,9 @@ +from mitmproxy.contentviews import html_outline +from test.mitmproxy.contentviews import full_eval + + +def test_view_html_outline(): + v = full_eval(html_outline.ViewHTMLOutline()) + s = b"<html><br><br></br><p>one</p></html>" + assert v(s) + assert v(b'\xfe')
\ No newline at end of file diff --git a/test/mitmproxy/contentviews/test_xml.py b/test/mitmproxy/contentviews/test_xml.py deleted file mode 100644 index 680134cb..00000000 --- a/test/mitmproxy/contentviews/test_xml.py +++ /dev/null @@ -1,17 +0,0 @@ -from mitmproxy.contentviews import xml -from . import full_eval - - -def test_view_xml(): - v = full_eval(xml.ViewXML()) - assert v(b"<foo></foo>") - assert not v(b"<foo>") - s = b"""<?xml version="1.0" encoding="UTF-8"?> - <?xml-stylesheet title="XSL_formatting"?> - <rss - xmlns:media="http://search.yahoo.com/mrss/" - xmlns:atom="http://www.w3.org/2005/Atom" - version="2.0"> - </rss> - """ - assert v(s) |