bioweb
0.09.92
C++/Python(django)/JavaScript(angularJS) framework
Main Page
Classes
Files
File List
File Members
web
current
tests.py
Go to the documentation of this file.
1
## @file current/tests.py
2
# @brief current server status unit testing
3
4
import
datetime
5
import
django.test
6
import
models
7
import
views
8
9
class
CurrentModelTestCase
(django.test.TestCase):
10
"""test module model"""
11
12
pass
13
14
class
CurrentViewTestCase
(django.test.TestCase):
15
"""test module interface"""
16
17
def
test01time
(self):
18
"""check server current time"""
19
self.assertEqual( views.time({}),
20
str(datetime.datetime.utcnow().strftime(
"%Y-%m-%d %H:%M:%S"
)) )
21
22
def
test02get
(self):
23
"""check if service return non-empty dict"""
24
d = views.get({})
25
self.assertEqual( len(d), 2)
26
27
28
web.current.tests.CurrentViewTestCase.test02get
def test02get(self)
Definition:
tests.py:22
web.current.tests.CurrentViewTestCase
Definition:
tests.py:14
web.current.tests.CurrentViewTestCase.test01time
def test01time(self)
Definition:
tests.py:17
web.current.tests.CurrentModelTestCase
Definition:
tests.py:9
Generated on Wed Nov 25 2015 21:50:49 for bioweb by
1.8.9.1