/tests/web/test_null_response.py

https://bitbucket.org/prologic/circuits/ · Python · 19 lines · 13 code · 6 blank · 0 comment · 3 complexity · b797310ea709383cd7cf53233c667e9b MD5 · raw file

  1. from circuits.web import Controller
  2. from .helpers import urlopen, HTTPError
  3. class Root(Controller):
  4. def index(self):
  5. pass
  6. def test(webapp):
  7. try:
  8. urlopen(webapp.server.http.base)
  9. except HTTPError as e:
  10. assert e.code == 404
  11. assert e.msg == "Not Found"
  12. else:
  13. assert False