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
This commit is contained in:
Brad P. Crochet 2017-01-12 17:45:12 -05:00
parent 2ab8dc9c37
commit 4638064922
1 changed files with 1 additions and 1 deletions

View File

@ -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')
)