def default_addons(): return [ anticache.AntiCache(), anticomp.AntiComp(), stickyauth.StickyAuth(), stickycookie.StickyCookie(), script.ScriptLoader(), filestreamer.FileStreamer(), replace.Replace(), setheaders.SetHeaders(), ]
def default_addons(): return [ anticache.AntiCache(), anticomp.AntiComp(), stickyauth.StickyAuth(), stickycookie.StickyCookie(), script.ScriptLoader(), filestreamer.FileStreamer(), # replace.Replace(), setheaders.SetHeaders(), serverplayback.ServerPlayback(), clientplayback.ClientPlayback(), ]
def test_simple(self): o = options.Options(anticache=True) m = master.Master(o, proxy.DummyServer()) sa = anticache.AntiCache() m.addons.add(sa) f = tutils.tflow(resp=True) m.request(f) f = tutils.tflow(resp=True) f.request.headers["if-modified-since"] = "test" f.request.headers["if-none-match"] = "test" m.request(f) assert "if-modified-since" not in f.request.headers assert "if-none-match" not in f.request.headers
def test_simple(self): s = state.State() o = options.Options(anticache = True) m = master.FlowMaster(o, None, s) sa = anticache.AntiCache() m.addons.add(o, sa) f = tutils.tflow(resp=True) self.invoke(m, "request", f) f = tutils.tflow(resp=True) f.request.headers["if-modified-since"] = "test" f.request.headers["if-none-match"] = "test" self.invoke(m, "request", f) assert "if-modified-since" not in f.request.headers assert "if-none-match" not in f.request.headers