[Zodb-checkins] CVS: ZODB3/ZEO/tests - testAuth.py:1.3.6.4
Christian Reis
kiko at async.com.br
Tue Dec 23 07:04:05 EST 2003
Update of /cvs-repository/ZODB3/ZEO/tests
In directory cvs.zope.org:/tmp/cvs-serv23733/tests
Modified Files:
Tag: Zope-2_7-branch
testAuth.py
Log Message:
Adding a simple test for the zeopasswd script. Modifies zeopasswd.main()
slightly to accept a Database class; this is used only because
auth_plaintext isn't an "officially supported" authentication protocol.
=== ZODB3/ZEO/tests/testAuth.py 1.3.6.3 => 1.3.6.4 ===
--- ZODB3/ZEO/tests/testAuth.py:1.3.6.3 Fri Sep 19 16:45:49 2003
+++ ZODB3/ZEO/tests/testAuth.py Tue Dec 23 07:03:58 2003
@@ -21,6 +21,7 @@
import zLOG
from ThreadedAsync import LoopCallback
+from ZEO import zeopasswd
from ZEO.ClientStorage import ClientStorage
from ZEO.Exceptions import ClientDisconnected
from ZEO.StorageServer import StorageServer
@@ -44,7 +45,18 @@
self.pwdb = self.dbclass(self.pwfile)
self.pwdb.add_user("foo", "bar")
self.pwdb.save()
+ self._checkZEOpasswd()
self.__super_setUp()
+
+ def _checkZEOpasswd(self):
+ args = ["-f", self.pwfile, "-p", self.protocol]
+ if self.protocol == "plaintext":
+ from ZEO.auth.base import Database
+ zeopasswd.main(args + ["-d", "foo"], Database)
+ zeopasswd.main(args + ["foo", "bar"], Database)
+ else:
+ zeopasswd.main(args + ["-d", "foo"])
+ zeopasswd.main(args + ["foo", "bar"])
def tearDown(self):
self.__super_tearDown()
More information about the Zodb-checkins
mailing list