[973924]: / qiita_pet / test / test_logger.py

Download this file

28 lines (20 with data), 893 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# -----------------------------------------------------------------------------
# Copyright (c) 2014--, The Qiita Development Team.
#
# Distributed under the terms of the BSD 3-clause License.
#
# The full license is in the file LICENSE, distributed with this software.
# -----------------------------------------------------------------------------
from unittest import main
from qiita_pet.test.tornado_test_base import TestHandlerBase
class TestLogEntryViewerHandler(TestHandlerBase):
def test_get(self):
response = self.get('/admin/error/')
self.assertEqual(response.code, 403)
def test_post(self):
response = self.post('/admin/error/', {'numrecords': -5})
self.assertEqual(response.code, 403)
response = self.post('/admin/error/', {'numrecords': 20})
self.assertEqual(response.code, 403)
if __name__ == "__main__":
main()