[Zope3-checkins] CVS: ZopeProducts/PsycopgDA/tests - testAdapter.py:1.2
Viktorija Zaksiene
ryzaja@codeworks.lt
Tue, 24 Dec 2002 04:34:31 -0500
Update of /cvs-repository/ZopeProducts/PsycopgDA/tests
In directory cvs.zope.org:/tmp/cvs-serv9679/tests
Modified Files:
testAdapter.py
Log Message:
Fixed TZStub for failing tests.
=== ZopeProducts/PsycopgDA/tests/testAdapter.py 1.1 => 1.2 ===
--- ZopeProducts/PsycopgDA/tests/testAdapter.py:1.1 Mon Dec 2 06:12:37 2002
+++ ZopeProducts/PsycopgDA/tests/testAdapter.py Tue Dec 24 04:34:30 2002
@@ -19,6 +19,7 @@
from unittest import TestCase, TestSuite, main, makeSuite
import psycopg
import sys
+from datetime import tzinfo
class Stub:
@@ -26,7 +27,7 @@
self.__dict__.update(kw)
-class TZStub:
+class TZStub(tzinfo):
def __init__(self, h, m):
self.offset = h * 60 + m
@@ -42,6 +43,9 @@
def __repr__(self):
return 'tzinfo(%d)' % self.offset
+
+ def __reduce__(self):
+ return type(self), (), self.__dict__
class PsycopgStub: