Browse Source

[2823] avoid hardcoded constant test time data to be compared with local time

it would only pass at the same time zone as that of the original developer.
JINMEI Tatuya 12 years ago
parent
commit
b308ba3bf7
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/bin/stats/tests/test_utils.py

+ 1 - 1
src/bin/stats/tests/test_utils.py

@@ -466,7 +466,7 @@ class MyStatsHttpd(stats_httpd.StatsHttpd):
                       'lname': 'test-lname',
                       'boot_time':
                           time.strftime('%Y-%m-%dT%H:%M:%SZ', CONST_BASETIME),
-                      'timestamp': 1308759248.0},
+                      'timestamp': time.mktime(CONST_BASETIME)},
             'Auth': {'queries.udp': 4, 'queries.tcp': 6,
                      'queries.perzone': [
                     {'queries.udp': 8, 'queries.tcp': 10,