[timezone] ensure tzinfo is None
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 12 Apr 2011 14:09:39 +0200
changeset 7211 cacff15f847d
parent 7209 d137084be191
child 7216 6053bf221fa9
[timezone] ensure tzinfo is None
server/test/unittest_postgres.py
server/test/unittest_querier.py
--- a/server/test/unittest_postgres.py	Mon Apr 11 22:28:57 2011 +0200
+++ b/server/test/unittest_postgres.py	Tue Apr 12 14:09:39 2011 +0200
@@ -69,6 +69,7 @@
         self.execute("INSERT Personne X: X nom 'bob', X tzdatenaiss %(date)s",
                      {'date': datetime(1977, 6, 7, 2, 0, tzinfo=FixedOffset(1))})
         datenaiss = self.execute("Any XD WHERE X nom 'bob', X tzdatenaiss XD")[0][0]
+        self.assertEqual(datenaiss.tzinfo, None)
         self.assertEqual(datenaiss.utctimetuple()[:5], (1977, 6, 7, 1, 0))
 
 
--- a/server/test/unittest_querier.py	Mon Apr 11 22:28:57 2011 +0200
+++ b/server/test/unittest_querier.py	Tue Apr 12 14:09:39 2011 +0200
@@ -1243,6 +1243,7 @@
         self.execute("INSERT Personne X: X nom 'bob', X tzdatenaiss %(date)s",
                      {'date': datetime(1977, 6, 7, 2, 0, tzinfo=FixedOffset(1))})
         datenaiss = self.execute("Any XD WHERE X nom 'bob', X tzdatenaiss XD")[0][0]
+        self.assertEqual(datenaiss.tzinfo, None)
         self.assertEqual(datenaiss.utctimetuple()[:5], (1977, 6, 7, 1, 0))
 
     # non regression tests #####################################################