Prevent test failures when converting to timezone
This commit is contained in:
parent
194f2d9f76
commit
35b11a0120
@ -110,7 +110,7 @@ class ConversationTest(unittest.TestCase):
|
|||||||
# See https://github.com/plone/plone.app.discussion/pull/204
|
# See https://github.com/plone/plone.app.discussion/pull/204
|
||||||
self.assertTrue(
|
self.assertTrue(
|
||||||
conversation.last_comment_date
|
conversation.last_comment_date
|
||||||
- datetime.now().astimezone(timezone.utc)
|
- datetime.utcnow().replace(tzinfo=timezone.utc)
|
||||||
< timedelta(seconds=1),
|
< timedelta(seconds=1),
|
||||||
)
|
)
|
||||||
self.assertTrue(comment.creation_date.tzinfo, timezone.utc)
|
self.assertTrue(comment.creation_date.tzinfo, timezone.utc)
|
||||||
|
Loading…
Reference in New Issue
Block a user