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:
parent
2ab8dc9c37
commit
4638064922
|
@ -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')
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue