From c3c03e509196c1d5cbce41d093b92db384061382 Mon Sep 17 00:00:00 2001 From: Peter Hamilton Date: Fri, 9 Aug 2019 10:33:27 -0400 Subject: [PATCH] Fix a bug with the debug logging for Initial Date filtering This change fixes a bug in the server engine unit tests that check the debug logs for Locate filtering on the Initial Date attribute. Specifically, time.asctime does not use the default '%d' notation for stringifying numerical day values. This change updates the string notation to match the format produced by time.asctime. Impacts #572 --- kmip/tests/unit/services/server/test_engine.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kmip/tests/unit/services/server/test_engine.py b/kmip/tests/unit/services/server/test_engine.py index 24d839d..e96e302 100644 --- a/kmip/tests/unit/services/server/test_engine.py +++ b/kmip/tests/unit/services/server/test_engine.py @@ -4587,14 +4587,14 @@ class TestKmipEngine(testtools.TestCase): ) obj_a.initial_date = int(time.time()) obj_a_time_str = time.strftime( - "%a %b %d %H:%M:%S %Y", + "%a %b %-2d %H:%M:%S %Y", time.gmtime(obj_a.initial_date) ) time.sleep(2) mid_time = int(time.time()) mid_time_str = time.strftime( - "%a %b %d %H:%M:%S %Y", + "%a %b %-2d %H:%M:%S %Y", time.gmtime(mid_time) ) time.sleep(2) @@ -4607,7 +4607,7 @@ class TestKmipEngine(testtools.TestCase): ) obj_b.initial_date = int(time.time()) obj_b_time_str = time.strftime( - "%a %b %d %H:%M:%S %Y", + "%a %b %-2d %H:%M:%S %Y", time.gmtime(obj_b.initial_date) )