Parcourir la 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 il y a 12 ans
Parent
commit
b308ba3bf7
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  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,