[Zodb-checkins] CVS: Zope3/src/zodb/zeo/tests - common.py:1.1.2.1 commitlock.py:1.3.2.3 connection.py:1.5.2.4 test_conn.py:1.3.6.2
Jeremy Hylton
jeremy@zope.com
Fri, 14 Feb 2003 15:49:11 -0500
Update of /cvs-repository/Zope3/src/zodb/zeo/tests
In directory cvs.zope.org:/tmp/cvs-serv1494/zeo/tests
Modified Files:
Tag: ZODB3-2-integration-branch
commitlock.py connection.py test_conn.py
Added Files:
Tag: ZODB3-2-integration-branch
common.py
Log Message:
Move DummyDB and TestClientStorage to separate module.
=== Added File Zope3/src/zodb/zeo/tests/common.py ===
##############################################################################
#
# Copyright (c) 2003 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE
#
##############################################################################
"""Common helper classes for testing."""
import threading
from zodb.zeo.client import ClientStorage
class TestClientStorage(ClientStorage):
def verify_cache(self, stub):
self.end_verify = threading.Event()
self.verify_result = super(TestClientStorage, self).verify_cache(stub)
def endVerify(self):
super(TestClientStorage, self).endVerify()
self.end_verify.set()
class DummyDB:
def invalidate(self, *args, **kws):
pass
=== Zope3/src/zodb/zeo/tests/commitlock.py 1.3.2.2 => 1.3.2.3 ===
--- Zope3/src/zodb/zeo/tests/commitlock.py:1.3.2.2 Thu Feb 13 13:23:25 2003
+++ Zope3/src/zodb/zeo/tests/commitlock.py Fri Feb 14 15:49:09 2003
@@ -23,12 +23,9 @@
from zodb.zeo.client import ClientStorage
from zodb.zeo.interfaces import ClientDisconnected
from zodb.zeo.tests.thread import TestThread
+from zodb.zeo.tests.common import DummyDB
ZERO = '\0'*8
-
-class DummyDB:
- def invalidate(self, *args):
- pass
class WorkerThread(TestThread):
=== Zope3/src/zodb/zeo/tests/connection.py 1.5.2.3 => 1.5.2.4 ===
--- Zope3/src/zodb/zeo/tests/connection.py:1.5.2.3 Thu Feb 13 19:29:10 2003
+++ Zope3/src/zodb/zeo/tests/connection.py Fri Feb 14 15:49:09 2003
@@ -27,6 +27,7 @@
from zodb.zeo.interfaces import ClientDisconnected
from zodb.zeo.zrpc.marshal import Marshaller
from zodb.zeo.tests import forker
+from zodb.zeo.tests.common import TestClientStorage, DummyDB
from transaction import get_transaction
from zodb.ztransaction import Transaction
@@ -35,20 +36,6 @@
from zodb.storage.tests.minpo import MinPO
from zodb.storage.tests.base import zodb_pickle, zodb_unpickle
from zodb.storage.tests.base import handle_all_serials, ZERO
-
-class TestClientStorage(ClientStorage):
-
- def verify_cache(self, stub):
- self.end_verify = threading.Event()
- self.verify_result = ClientStorage.verify_cache(self, stub)
-
- def endVerify(self):
- ClientStorage.endVerify(self)
- self.end_verify.set()
-
-class DummyDB:
- def invalidate(self, *args, **kws):
- pass
class CommonSetupTearDown(StorageTestBase):
"""Common boilerplate"""
=== Zope3/src/zodb/zeo/tests/test_conn.py 1.3.6.1 => 1.3.6.2 ===
--- Zope3/src/zodb/zeo/tests/test_conn.py:1.3.6.1 Thu Feb 13 19:29:10 2003
+++ Zope3/src/zodb/zeo/tests/test_conn.py Fri Feb 14 15:49:09 2003
@@ -19,7 +19,7 @@
import unittest
-from zodb.zeo.tests import connection
+from zodb.zeo.tests.connection import ConnectionTests, ReconnectionTests
from zodb.storage.base import berkeley_is_available
class FileStorageConfig:
@@ -53,7 +53,7 @@
name %s
</Storage>""" % path
-tests = [connection.ConnectionTests, connection.ReconnectionTests]
+tests = [ConnectionTests, ReconnectionTests]
configs = [FileStorageConfig, MappingStorageConfig]
if berkeley_is_available:
configs += [BerkeleyStorageConfig]