backport changes to fix tests
This commit is contained in:
parent
a509a9037b
commit
3bd238de37
|
@ -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",
|
||||
|
|
|
@ -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")])
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue