Fix inconsistent return value of timeutils.utcnow
The function returns a datetime instance without tzinfo. Change-Id: I0f295482640fc9d615d50ed681ffd6f61bc177ba
This commit is contained in:
@@ -61,7 +61,8 @@ class TestLogNotifier(test_utils.BaseTestCase):
|
||||
return_value=fake_transport):
|
||||
self.logger = oslo_messaging.LoggingNotificationHandler('test://')
|
||||
|
||||
mock_utcnow.return_value = datetime.datetime.utcnow()
|
||||
mock_utcnow.return_value = datetime.datetime.utcnow().replace(
|
||||
tzinfo=None)
|
||||
|
||||
levelno = getattr(logging, self.priority.upper(), 42)
|
||||
|
||||
@@ -121,7 +122,8 @@ class TestLogNotifier(test_utils.BaseTestCase):
|
||||
},
|
||||
})
|
||||
|
||||
mock_utcnow.return_value = datetime.datetime.utcnow()
|
||||
mock_utcnow.return_value = datetime.datetime.utcnow().replace(
|
||||
tzinfo=None)
|
||||
|
||||
levelno = getattr(logging, self.priority.upper())
|
||||
|
||||
|
Reference in New Issue
Block a user