[CalendarServer-changes] [8174] CalendarServer/branches/users/glyph/shared-pool-take2/twext/ enterprise
source_changes at macosforge.org
source_changes at macosforge.org
Mon Oct 10 08:05:55 PDT 2011
Revision: 8174
http://trac.macosforge.org/projects/calendarserver/changeset/8174
Author: glyph at apple.com
Date: 2011-10-10 08:05:54 -0700 (Mon, 10 Oct 2011)
Log Message:
-----------
be a bit more careful about paramstyle and dialect in the tests
Modified Paths:
--------------
CalendarServer/branches/users/glyph/shared-pool-take2/twext/enterprise/adbapi2.py
CalendarServer/branches/users/glyph/shared-pool-take2/twext/enterprise/test/test_adbapi2.py
Modified: CalendarServer/branches/users/glyph/shared-pool-take2/twext/enterprise/adbapi2.py
===================================================================
--- CalendarServer/branches/users/glyph/shared-pool-take2/twext/enterprise/adbapi2.py 2011-10-10 15:05:42 UTC (rev 8173)
+++ CalendarServer/branches/users/glyph/shared-pool-take2/twext/enterprise/adbapi2.py 2011-10-10 15:05:54 UTC (rev 8174)
@@ -1276,7 +1276,7 @@
A client which can execute SQL.
"""
- def __init__(self, dialect=POSTGRES_DIALECT, paramstyle=POSTGRES_DIALECT):
+ def __init__(self, dialect=POSTGRES_DIALECT, paramstyle=DEFAULT_PARAM_STYLE):
# See DEFAULT_PARAM_STYLE FIXME above.
super(ConnectionPoolClient, self).__init__()
self._nextID = count().next
Modified: CalendarServer/branches/users/glyph/shared-pool-take2/twext/enterprise/test/test_adbapi2.py
===================================================================
--- CalendarServer/branches/users/glyph/shared-pool-take2/twext/enterprise/test/test_adbapi2.py 2011-10-10 15:05:42 UTC (rev 8173)
+++ CalendarServer/branches/users/glyph/shared-pool-take2/twext/enterprise/test/test_adbapi2.py 2011-10-10 15:05:54 UTC (rev 8174)
@@ -43,6 +43,7 @@
from twext.enterprise.ienterprise import POSTGRES_DIALECT
from twext.enterprise.ienterprise import ICommandBlock
from twext.enterprise.adbapi2 import FailsafeException
+from twext.enterprise.adbapi2 import DEFAULT_PARAM_STYLE
from twext.enterprise.adbapi2 import ConnectionPool
@@ -442,6 +443,7 @@
"""
dialect = POSTGRES_DIALECT
+ paramstyle = DEFAULT_PARAM_STYLE
def setUp(self):
"""
@@ -453,7 +455,8 @@
self.factory = ConnectionFactory()
self.pool = ConnectionPool(self.factory.connect,
maxConnections=2,
- dialect=self.dialect)
+ dialect=self.dialect,
+ paramstyle=self.paramstyle)
self.pool._createHolder = self.makeAHolder
self.clock = self.pool.reactor = ClockWithThreads()
self.pool.startService()
@@ -1359,7 +1362,8 @@
L{ConnectionPoolClient}.
"""
super(NetworkedPoolHelper, self).setUp()
- self.pump = IOPump(ConnectionPoolClient(),
+ self.pump = IOPump(ConnectionPoolClient(dialect=self.dialect,
+ paramstyle=self.paramstyle),
ConnectionPoolConnection(self.pool))
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20111010/7ecd719f/attachment.html>
More information about the calendarserver-changes
mailing list