PageRenderTime 8ms CodeModel.GetById 3ms app.highlight 1ms RepoModel.GetById 3ms app.codeStats 0ms

/tests/web/test_wsgi_gateway_yield.py

https://bitbucket.org/prologic/circuits/
Python | 17 lines | 11 code | 5 blank | 1 comment | 0 complexity | 0382301cf470991c726e99f1140e6a3c MD5 | raw file
 1#!/usr/bin/env python
 2
 3from .helpers import urlopen
 4
 5
 6def application(environ, start_response):
 7    status = "200 OK"
 8    response_headers = [("Content-type", "text/plain")]
 9    start_response(status, response_headers)
10    yield "Hello "
11    yield "World!"
12
13
14def test(webapp):
15    f = urlopen(webapp.server.http.base)
16    s = f.read()
17    assert s == b"Hello World!"