]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2823] avoid hardcoded constant test time data to be compared with local time
authorJINMEI Tatuya <jinmei@isc.org>
Mon, 6 May 2013 17:56:27 +0000 (10:56 -0700)
committerJINMEI Tatuya <jinmei@isc.org>
Mon, 6 May 2013 17:56:27 +0000 (10:56 -0700)
it would only pass at the same time zone as that of the original developer.

src/bin/stats/tests/test_utils.py

index 6ad9e40dab2fee93db29bac859069f4ae280974d..8bb7d4ff606976274bba7bd445b79468d573d20e 100644 (file)
@@ -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,