aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_dump.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2012-08-19 00:22:42 +1200
committerAldo Cortesi <aldo@nullcube.com>2012-08-19 00:22:42 +1200
commit60659a89c38cdbae3f7163d46aab12f49261ab6a (patch)
tree8668a13c47b6f1f3e5adf3400f68be3868c61804 /test/test_dump.py
parent1b7990897e57df2d095e6eb06aa6c27bc81195ba (diff)
downloadmitmproxy-60659a89c38cdbae3f7163d46aab12f49261ab6a.tar.gz
mitmproxy-60659a89c38cdbae3f7163d46aab12f49261ab6a.tar.bz2
mitmproxy-60659a89c38cdbae3f7163d46aab12f49261ab6a.zip
Little bit of love for the unit tests.
Diffstat (limited to 'test/test_dump.py')
-rw-r--r--test/test_dump.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/test_dump.py b/test/test_dump.py
index 884a5b64..0337bb33 100644
--- a/test/test_dump.py
+++ b/test/test_dump.py
@@ -99,6 +99,12 @@ class TestDumpMaster:
f = self._cycle(m, "content")
assert f.request.content == "foo"
+ def test_setheader(self):
+ o = dump.Options(setheaders=[(".*", "one", "two")])
+ m = dump.DumpMaster(None, o, None)
+ f = self._cycle(m, "content")
+ assert f.request.headers["one"] == ["two"]
+
def test_basic(self):
for i in (1, 2, 3):
assert "GET" in self._dummy_cycle(1, "~s", "", verbosity=i, eventlog=True)