aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/test_flow.py2
-rw-r--r--test/test_proxy.py11
2 files changed, 12 insertions, 1 deletions
diff --git a/test/test_flow.py b/test/test_flow.py
index d72a1894..7ab8c753 100644
--- a/test/test_flow.py
+++ b/test/test_flow.py
@@ -405,7 +405,6 @@ class uFlowMaster(libpry.AutoTree):
fm.handle_error(proxy.Error(f.request, "error"))
-
def test_server_playback(self):
s = flow.State()
@@ -414,6 +413,7 @@ class uFlowMaster(libpry.AutoTree):
pb = [f]
fm = flow.FlowMaster(None, s)
+ fm.refresh_server_playback = True
assert not fm.do_server_playback(tutils.tflow())
fm.start_server_playback(pb, False, [], False)
diff --git a/test/test_proxy.py b/test/test_proxy.py
index a449071c..6bae46fc 100644
--- a/test/test_proxy.py
+++ b/test/test_proxy.py
@@ -132,6 +132,17 @@ class uResponse(libpry.AutoTree):
r.headers["set-cookie"] = ["MOO=BAR; Expires=Tue, 08-Mar-2011 00:20:38 GMT; Path=foo.com; Secure"]
r.refresh()
+ def test_refresh_cookie(self):
+ r = tutils.tresp()
+
+ # Invalid expires format, sent to us by Reddit.
+ c = "rfoo=bar; Domain=reddit.com; expires=Thu, 31 Dec 2037 23:59:59 GMT; Path=/"
+ assert r._refresh_cookie(c, 60)
+
+ c = "MOO=BAR; Expires=Tue, 08-Mar-2011 00:20:38 GMT; Path=foo.com; Secure"
+ assert "00:21:38" in r._refresh_cookie(c, 60)
+
+
def test_getset_state(self):
h = utils.Headers()
h["test"] = ["test"]