summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Petrov <andrey.petrov@shazow.net>2015-09-04 01:16:44 -0700
committerAndrey Petrov <andrey.petrov@shazow.net>2015-09-04 01:16:44 -0700
commiteb06d8d27f032bf8b2613891168b480814a163b0 (patch)
tree6ac700a503ff06fe1eb300a87f933eb485d1828d
parent4aafbe605518adcb2f055555164b5adda94b1e50 (diff)
downloadurllib3-cleanup.tar.gz
tests: Adding sleep handler back in temporarily for GAE testscleanup
-rw-r--r--dummyserver/handlers.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/dummyserver/handlers.py b/dummyserver/handlers.py
index 8028b16d..43398cdf 100644
--- a/dummyserver/handlers.py
+++ b/dummyserver/handlers.py
@@ -166,6 +166,14 @@ class TestingApp(RequestHandler):
headers = [('Connection', 'keep-alive')]
return Response('Keeping alive', headers=headers)
+ def sleep(self, request):
+ "Sleep for a specified amount of ``seconds``"
+ # DO NOT USE THIS, IT'S DEPRECATED.
+ # FIXME: Delete this once appengine tests are fixed to not use this handler.
+ seconds = float(request.params.get('seconds', '1'))
+ time.sleep(seconds)
+ return Response()
+
def echo(self, request):
"Echo back the params"
if request.method == 'GET':