aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_utils.py
diff options
context:
space:
mode:
authorThomas Kriechbaumer <thomas@kriechbaumer.name>2015-08-09 22:15:58 +0200
committerThomas Kriechbaumer <thomas@kriechbaumer.name>2015-08-10 21:04:17 +0200
commit891fa50e554963ef7cf236b087cfbedfaf19849e (patch)
treef6d0347829b3cc7d35027083655b0de3762cef74 /test/test_utils.py
parenta10c31c6984f9b6646d2a7bad05ace912ea152a7 (diff)
downloadmitmproxy-891fa50e554963ef7cf236b087cfbedfaf19849e.tar.gz
mitmproxy-891fa50e554963ef7cf236b087cfbedfaf19849e.tar.bz2
mitmproxy-891fa50e554963ef7cf236b087cfbedfaf19849e.zip
move code to netlib
Diffstat (limited to 'test/test_utils.py')
-rw-r--r--test/test_utils.py28
1 files changed, 0 insertions, 28 deletions
diff --git a/test/test_utils.py b/test/test_utils.py
index 0ee23b97..0cda23b4 100644
--- a/test/test_utils.py
+++ b/test/test_utils.py
@@ -44,25 +44,6 @@ def test_pretty_json():
assert not utils.pretty_json("moo")
-def test_multipartdecode():
- boundary = 'somefancyboundary'
- headers = odict.ODict(
- [('content-type', ('multipart/form-data; boundary=%s' % boundary))])
- content = "--{0}\n" \
- "Content-Disposition: form-data; name=\"field1\"\n\n" \
- "value1\n" \
- "--{0}\n" \
- "Content-Disposition: form-data; name=\"field2\"\n\n" \
- "value2\n" \
- "--{0}--".format(boundary)
-
- form = utils.multipartdecode(headers, content)
-
- assert len(form) == 2
- assert form[0] == ('field1', 'value1')
- assert form[1] == ('field2', 'value2')
-
-
def test_pretty_duration():
assert utils.pretty_duration(0.00001) == "0ms"
assert utils.pretty_duration(0.0001) == "0ms"
@@ -121,14 +102,5 @@ def test_parse_size():
tutils.raises(ValueError, utils.parse_size, "ak")
-def test_parse_content_type():
- p = utils.parse_content_type
- assert p("text/html") == ("text", "html", {})
- assert p("text") is None
-
- v = p("text/html; charset=UTF-8")
- assert v == ('text', 'html', {'charset': 'UTF-8'})
-
-
def test_safe_subn():
assert utils.safe_subn("foo", u"bar", "\xc2foo")