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

/tests/web/test_null_response.py

https://bitbucket.org/prologic/circuits/
Python | 19 lines | 13 code | 6 blank | 0 comment | 0 complexity | b797310ea709383cd7cf53233c667e9b MD5 | raw file
 1from circuits.web import Controller
 2
 3from .helpers import urlopen, HTTPError
 4
 5
 6class Root(Controller):
 7
 8    def index(self):
 9        pass
10
11
12def test(webapp):
13    try:
14        urlopen(webapp.server.http.base)
15    except HTTPError as e:
16        assert e.code == 404
17        assert e.msg == "Not Found"
18    else:
19        assert False