From 46380649220bfcafc4964e9eb8f7b52466f387a6 Mon Sep 17 00:00:00 2001 From: "Brad P. Crochet" Date: Thu, 12 Jan 2017 17:45:12 -0500 Subject: [PATCH] Use utcnow() instead of now() The ActionTestsV2.test_get_list_actions_greater_than_filter test will fail if the system running the tests has a TZ that is behind UTC. By using utcnow(), it will compare the times correctly. Change-Id: I0bf6cadac9c3f01681e603b9c77c55ba87029dbd --- mistral_tempest_tests/tests/api/v2/test_actions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mistral_tempest_tests/tests/api/v2/test_actions.py b/mistral_tempest_tests/tests/api/v2/test_actions.py index 828fabc..7d49794 100644 --- a/mistral_tempest_tests/tests/api/v2/test_actions.py +++ b/mistral_tempest_tests/tests/api/v2/test_actions.py @@ -187,7 +187,7 @@ class ActionTestsV2(base.TestCase): @test.attr(type='smoke') def test_get_list_actions_greater_than_filter(self): - time = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S") + time = datetime.datetime.utcnow().strftime("%Y-%m-%d %H:%M:%S") resp, body = self.client.get_list_obj( 'actions?created_at=gt:' + time.replace(' ', '%20') )