Commit 25cc1b63 authored by Denis Bilenko's avatar Denis Bilenko

wsgi_test.py: add get_listener() to TestCase

parent a65a6072
......@@ -200,12 +200,16 @@ class TestCase(greentest.TestCase):
validator = staticmethod(validator)
def get_listener(self):
return ('127.0.0.1', 0)
def setUp(self):
greentest.TestCase.setUp(self)
application = self.application
if self.validator is not None:
application = self.validator(application)
self.server = self.get_wsgi_module().WSGIServer(('127.0.0.1', 0), application)
listener = self.get_listener()
self.server = self.get_wsgi_module().WSGIServer(listener, application)
self.server.start()
self.port = self.server.server_port
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment