hooks/test/unittest_hooks.py
changeset 11034 75d752e6daf7
parent 11033 63d860a14a17
--- a/hooks/test/unittest_hooks.py	Fri Dec 18 09:23:23 2015 +0100
+++ b/hooks/test/unittest_hooks.py	Tue Dec 22 15:35:10 2015 +0100
@@ -26,6 +26,7 @@
 
 from six import text_type
 
+from pytz import utc
 from cubicweb import ValidationError, AuthenticationError, BadConnectionId
 from cubicweb.devtools.testlib import CubicWebTC
 
@@ -115,7 +116,7 @@
 
     def test_metadata_creation_modification_date(self):
         with self.admin_access.repo_cnx() as cnx:
-            _now = datetime.utcnow()
+            _now = datetime.now(utc)
             entity = cnx.create_entity('Workflow', name=u'wf1')
             self.assertEqual((entity.creation_date - _now).seconds, 0)
             self.assertEqual((entity.modification_date - _now).seconds, 0)