fix tests, re-enable pypy, do housekeeping

This commit is contained in:
Maximilian Hils 2015-02-07 01:17:24 +01:00
parent 17e44db9fd
commit 2ed09beae4
4 changed files with 11 additions and 10 deletions

View File

@ -2,7 +2,7 @@ language: python
sudo: false
python:
- "2.7"
# - pypy # pypy 2.5.0 has a regression bug which breaks our test suite.
- pypy
# command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors
install:
- "pip install --upgrade --src . -r requirements.txt"
@ -20,4 +20,4 @@ notifications:
cache:
directories:
- /home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages
- /home/travis/virtualenv/pypy-2.4.0/site-packages
- /home/travis/virtualenv/pypy-2.5.0/site-packages

View File

@ -309,10 +309,10 @@ class StickyCookieState:
# FIXME: We now know that Cookie.py screws up some cookies with
# valid RFC 822/1123 datetime specifications for expiry. Sigh.
c = Cookie.SimpleCookie(str(i))
m = c.values()[0]
for m in c.values():
k = self.ckey(m, f)
if self.domain_match(f.request.host, k[0]):
self.jar[self.ckey(m, f)] = m
self.jar[k] = m
def handle_request(self, f):
l = []

View File

@ -33,8 +33,7 @@ script_deps = {
for script in scripts:
deps.update(script_deps[script])
if os.name == "nt":
deps.add("pydivert>=0.0.4") # Transparent proxying on Windows
deps.add("pydivert>=0.0.7") # Transparent proxying on Windows
setup(
name="mitmproxy",
@ -55,6 +54,8 @@ setup(
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Security",
"Topic :: Internet",
"Topic :: Internet :: WWW/HTTP",

View File

@ -47,7 +47,7 @@ class TestStickyCookieState:
assert s.domain_match("google.com", ".google.com")
def test_handle_response(self):
c = "SSID=mooo, FOO=bar; Domain=.google.com; Path=/; "\
c = "SSID=mooo; domain=.google.com, FOO=bar; Domain=.google.com; Path=/; "\
"Expires=Wed, 13-Jan-2021 22:23:01 GMT; Secure; "
s, f = self._response(c, "host")