Skip to content

Commit

Permalink
Add tests for frontend html
Browse files Browse the repository at this point in the history
Added test for index page, it just checks if it can find the a proper
title for the page

Signed-off-by: Vasudev Kamath <kamathvasudev@gmail.com>
  • Loading branch information
copyninja committed Apr 29, 2014
1 parent 50e1104 commit bab34ba
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tests/frontend/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# -*- coding: utf-8 -*-
"""
tests.frontend
~~~~~~~~~~~~~~
frontend tests package
"""

from silpa.frontend import create_app
from .. import SILPAAppTestCase, settings


class SILPAFrontEndTestCase(SILPAAppTestCase):

def _create_app(self):
return create_app(settings)

def setUp(self):
super(SILPAFrontEndTestCase, self).setUp()
17 changes: 17 additions & 0 deletions tests/frontend/mainpage_tests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# -*- coding: utf-8 -*-
"""
tests.frontend.mainpage_tests
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main page frontend tests module
"""

from . import SILPAFrontEndTestCase


class MainPageTestCase(SILPAFrontEndTestCase):

def test_indexpage(self):
r = self.get('/')
self.assertIn('<title> SILPA - Indic Language Computing Platform ' +
'</title>', self.assertOk(r).data)

0 comments on commit bab34ba

Please sign in to comment.