66:db31e73bde12
Anton Shestakov <av6@dwimlabs.net>, Sat, 25 Jun 2016 18:16:39 +0800
models: drop Check.raw field (not worth storing in the same table) Replaying checks can be done (and is easier) when storing checker output in plain files, so let's lighten up the load on the database.

next change 78:06a1f6536049
previous change 41:8d6436a284d2

tests/test_viewer.py

Permissions: -rw-r--r--

Other formats: Feeds:
from mock import Mock
from tornado.testing import AsyncHTTPTestCase
from candolint.models import database, Project, Change, Check
from viewer import CandolintViewer
def setup_module():
database.init(':memory:')
database.connect()
database.create_tables([Project, Change, Check], safe=True)
database.init = Mock()
database.connect = Mock()
database.close = Mock()
class ViewerTestCase(AsyncHTTPTestCase):
def get_app(self):
return CandolintViewer()
def test_index(self):
response = self.fetch('/')
assert response.code == 200
assert 'online linter' in response.body
def test_404(self):
response = self.fetch('/nobodyhere')
assert response.code == 404
assert 'online linter' in response.body