diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2012-04-28 22:54:45 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2012-04-28 22:54:45 +1200 |
commit | ee909e265b40743479ca2f3e8b518f76c91f83f8 (patch) | |
tree | f267a1e2c3d7d23843f67794f090892b6b4d8177 /test/test_rparse.py | |
parent | 2d989e2fbb8b87847c215a984bc8a010ce583a8e (diff) | |
download | mitmproxy-ee909e265b40743479ca2f3e8b518f76c91f83f8.tar.gz mitmproxy-ee909e265b40743479ca2f3e8b518f76c91f83f8.tar.bz2 mitmproxy-ee909e265b40743479ca2f3e8b518f76c91f83f8.zip |
Add a shortcut for setting Location header.
Diffstat (limited to 'test/test_rparse.py')
-rw-r--r-- | test/test_rparse.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/test/test_rparse.py b/test/test_rparse.py index 5a3cb53c..c854b0c6 100644 --- a/test/test_rparse.py +++ b/test/test_rparse.py @@ -177,9 +177,10 @@ class uDisconnects(libpry.AutoTree): assert isinstance(v, rparse.DisconnectRandom) -class uShortcutContentType(libpry.AutoTree): +class uShortcuts(libpry.AutoTree): def test_parse(self): - assert len(rparse.parse({}, "400:c'foo'").headers) == 1 + assert rparse.parse({}, "400:c'foo'").headers[0][0][:] == "Content-Type" + assert rparse.parse({}, "400:l'foo'").headers[0][0][:] == "Location" class uPauses(libpry.AutoTree): @@ -312,5 +313,5 @@ tests = [ uDisconnects(), uMisc(), uparse(), - uShortcutContentType() + uShortcuts() ] |