[Zodb-checkins] CVS: ZODB3/ZEO/tests - testZEO.py:1.49
Guido van Rossum
guido@python.org
Thu, 26 Sep 2002 11:56:01 -0400
Update of /cvs-repository/ZODB3/ZEO/tests
In directory cvs.zope.org:/tmp/cvs-serv6684
Modified Files:
testZEO.py
Log Message:
Differentiate between read-only storage and read-only server in the
simple read-only tests. (These tests pass.)
=== ZODB3/ZEO/tests/testZEO.py 1.48 => 1.49 ===
--- ZODB3/ZEO/tests/testZEO.py:1.48 Thu Sep 26 11:53:17 2002
+++ ZODB3/ZEO/tests/testZEO.py Thu Sep 26 11:56:01 2002
@@ -334,8 +334,8 @@
# Stores should fail here
self.assertRaises(ReadOnlyError, self._dostore)
- def checkReadOnlyServer(self):
- # Open a read-only client to a read-only server; stores fail
+ def checkReadOnlyStorage(self):
+ # Open a read-only client to a read-only *storage*; stores fail
# We don't want the read-write server created by setUp()
self.shutdownServer()
@@ -344,6 +344,21 @@
# Start a read-only server
self._startServer(create=0, index=0, read_only=1)
+ # Start a read-only client
+ self._storage = self.openClientStorage(read_only=1)
+ # Stores should fail here
+ self.assertRaises(ReadOnlyError, self._dostore)
+
+ def checkReadOnlyServer(self):
+ # Open a read-only client to a read-only *server*; stores fail
+
+ # We don't want the read-write server created by setUp()
+ self.shutdownServer()
+ self._servers = []
+ self._pids = []
+
+ # Start a read-only server
+ self._startServer(create=0, index=0, ro_svr=1)
# Start a read-only client
self._storage = self.openClientStorage(read_only=1)
# Stores should fail here