backport changes to fix tests

This commit is contained in:
Maximilian Hils 2013-12-08 15:46:11 +01:00
parent a509a9037b
commit 3bd238de37
3 changed files with 6 additions and 5 deletions

View File

@ -8,8 +8,9 @@ class DumpError(Exception): pass
class Options(object):
attributes = [
"app",
"app_domain",
"app_ip",
"app_external",
"app_host",
"app_port",
"anticache",
"anticomp",
"client_replay",

View File

@ -111,7 +111,7 @@ class TestDumpMaster:
o = dump.Options(app=True)
s = mock.MagicMock()
m = dump.DumpMaster(s, o, None)
assert s.apps.add.call_count == 2
assert s.apps.add.call_count == 1
def test_replacements(self):
o = dump.Options(replacements=[(".*", "content", "foo")])

View File

@ -163,12 +163,12 @@ class HTTPProxTest(ProxTestBase):
if self.ssl:
p = libpathod.pathoc.Pathoc("127.0.0.1", self.proxy.port, True)
print "PRE"
p.connect((APP_IP, 80))
p.connect((APP_HOST, APP_PORT))
print "POST"
return p.request("get:'/%s'"%page)
else:
p = self.pathoc()
return p.request("get:'http://%s/%s'"%(APP_DOMAIN, page))
return p.request("get:'http://%s/%s'"%(APP_HOST, page))
class TResolver: