Anton Shestakov <av6@dwimlabs.net>, Sat, 18 Jun 2016 18:56:40 +0800
tests: test index page and a non-existent page that gives 404
tests/test_viewer.py
Permissions: -rw-r--r--
from tornado.testing import AsyncHTTPTestCase from candolint.models import database, Project, Change, Check from viewer import CandolintViewer class ViewerTestCase(AsyncHTTPTestCase): database.init(':memory:') database.create_tables([Project, Change, Check], safe=True) database.connect = Mock() database.disconnect = Mock() response = self.fetch('/') assert response.code == 200 response = self.fetch('/nobodyhere') assert response.code == 404