From 4a2adfe453245b1e798f1a5cb3a50fe08407e347 Mon Sep 17 00:00:00 2001 From: Kota Tsuyuzaki Date: Thu, 12 Jan 2017 17:44:10 -0800 Subject: [PATCH] Make timestamp setting to be consistent in test loop This is a kind of the follow-up patch https://review.openstack.org/#/c/419579 And I'd address one more my mistake with this patch, that is inconsistent timestamp setting between test_GET_limit_marker_json and test_GET_limit_marker_xml Change-Id: Ia2e0c62c6146c0d79c7de2de82fe13ec4dd98165 --- test/unit/account/test_server.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/unit/account/test_server.py b/test/unit/account/test_server.py index 8a6a331661..56c1cb4e43 100644 --- a/test/unit/account/test_server.py +++ b/test/unit/account/test_server.py @@ -1143,14 +1143,15 @@ class TestAccountController(unittest.TestCase): 'HTTP_X_TIMESTAMP': '0'}) req.get_response(self.controller) for c in range(5): + put_timestamp = normalize_timestamp(c + 1) req = Request.blank( '/sda1/p/a/c%d' % c, environ={'REQUEST_METHOD': 'PUT'}, - headers={'X-Put-Timestamp': str(c + 1), + headers={'X-Put-Timestamp': put_timestamp, 'X-Delete-Timestamp': '0', 'X-Object-Count': '2', 'X-Bytes-Used': '3', - 'X-Timestamp': normalize_timestamp(c)}) + 'X-Timestamp': put_timestamp}) req.get_response(self.controller) req = Request.blank('/sda1/p/a?limit=3&format=xml', environ={'REQUEST_METHOD': 'GET'})