[Zodb-checkins] CVS: ZODB3/ZEO - zeopasswd.py:1.7
Christian Reis
kiko at async.com.br
Tue Dec 23 07:06:59 EST 2003
Update of /cvs-repository/ZODB3/ZEO
In directory cvs.zope.org:/tmp/cvs-serv24280
Modified Files:
zeopasswd.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/zeopasswd.py 1.6 => 1.7 ===
--- ZODB3/ZEO/zeopasswd.py:1.6 Thu Dec 18 21:59:35 2003
+++ ZODB3/ZEO/zeopasswd.py Tue Dec 23 07:06:28 2003
@@ -101,7 +101,7 @@
return auth_protocol, auth_db, auth_realm, delete, username, password
-def main(args=None):
+def main(args=None, dbclass=None):
p, auth_db, auth_realm, delete, username, password = options(args)
if p is None:
usage("Error: configuration does not specify auth protocol")
@@ -109,6 +109,9 @@
from ZEO.auth.auth_digest import DigestDatabase as Database
elif p == "srp":
from ZEO.auth.auth_srp import SRPDatabase as Database
+ elif dbclass:
+ # dbclass is used for testing tests.auth_plaintext, see testAuth.py
+ Database = dbclass
else:
raise ValueError, "Unknown database type %r" % p
if auth_db is None:
More information about the Zodb-checkins
mailing list