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

/tests/web/test_yield.py

https://bitbucket.org/prologic/circuits/
Python | 18 lines | 10 code | 7 blank | 1 comment | 0 complexity | 872a68798b4c12d21a99ce7b681ea63c MD5 | raw file
 1#!/usr/bin/env python
 2
 3from circuits.web import Controller
 4
 5from .helpers import urlopen
 6
 7
 8class Root(Controller):
 9
10    def index(self):
11        yield "Hello "
12        yield "World!"
13
14
15def test(webapp):
16    f = urlopen(webapp.server.http.base)
17    s = f.read()
18    assert s == b"Hello World!"