bioweb  0.09.92
C++/Python(django)/JavaScript(angularJS) framework
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