Skip to content

Commit

Permalink
Add tests for page not found error
Browse files Browse the repository at this point in the history
Signed-off-by: Vasudev Kamath <kamathvasudev@gmail.com>
  • Loading branch information
copyninja committed May 1, 2014
1 parent c760b7e commit 103c53a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/api/jsonrpc_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,7 @@ def test_result_jsonrpc(self):
params=['Hello World!', 'kn_IN'],
id=random.randint(1, 1000))
self.assertJsonRpcResult(self.jpost('/api/JSONRPC', data=data))

def test_notfound(self):
r = self.post('/api/JS')
self.assertStatusCode(r, 404)
4 changes: 4 additions & 0 deletions tests/frontend/mainpage_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,7 @@ def test_moduleloaded(self):
# r1 = self.get('/' + m)
# self.assertIn('<title> {} - Indic Language Computing Platform ' +
# '</title>', self.assertOk(r1).data)

def test_pagenotfound(self):
r = self.get('/blablabla')
self.assertStatusCode(r, 404)

0 comments on commit 103c53a

Please sign in to comment.