예제 #1
0
파일: test-wsgi.py 프로젝트: zhou0/quixote
    def setup(self):
        wsgi_app = None

        x = sys.stdout  # Quixote mangles sys.stdout; save.
        try:
            publisher = create_publisher()
            wsgi_app = quixote.get_wsgi_app()
        finally:
            sys.stdout = x  # restore.

        twill.add_wsgi_intercept('localhost', 80, lambda: wsgi_app, '/qx_test')
예제 #2
0
    def setup(self):
        wsgi_app = None

        x = sys.stdout  # Quixote mangles sys.stdout; save.
        try:
            publisher = create_publisher()
            wsgi_app = quixote.get_wsgi_app()
        finally:
            sys.stdout = x  # restore.

        twill.add_wsgi_intercept("localhost", 80, lambda: wsgi_app, "/qx_test")
예제 #3
0
import quixote, qx_testserver
from wsgiref.simple_server import make_server

qx_testserver.create_publisher()
wsgi_app = quixote.get_wsgi_app()

httpd = make_server('', 8000, wsgi_app)
httpd.serve_forever()