Skip to content
Browse files

update testcase

  • Loading branch information...
1 parent dc1673d commit 15c019489b09ac77ac9bd3446dd84f5ce4da9fbc @pengyuwei pengyuwei committed
Showing with 2 additions and 2 deletions.
  1. +1 −1 kanyun/server/api_server.py
  2. +1 −1 tests/test_plugin_agent.py
View
2 kanyun/server/api_server.py
@@ -163,7 +163,7 @@ def analyize_data(self, rs, period, statistic, show=False):
"""[private func]analyize the data
period: minutes
return: {"key":"value"}
- note: timestmp is already UTC time, so do NOT use time.gmtime again
+ note: timestmp is already UTC time, so do NOT use time.gmtime again!
"""
if rs is None \
or not isinstance(period, int):
View
2 tests/test_plugin_agent.py
@@ -131,7 +131,7 @@ def test_collect_info(self):
def test_get_utc_sec(self):
# self.a.get_utc_sec(test_a)
utc_sec = self.a.get_utc_sec()
- self.assertTrue(time.time() - 1 < utc_sec < time.time())
+ self.assertTrue(time.time() > utc_sec + 60*60)
def test_get_devs(self):
# make sure the shuffled sequence does not lose any elements

0 comments on commit 15c0194

Please sign in to comment.
Something went wrong with that request. Please try again.