[Zodb-checkins] CVS: ZODB3/ZEO - zeopasswd.py:1.2.6.4

Christian Reis kiko at async.com.br
Tue Dec 23 07:04:29 EST 2003


Update of /cvs-repository/ZODB3/ZEO
In directory cvs.zope.org:/tmp/cvs-serv23733

Modified Files:
      Tag: Zope-2_7-branch
	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.2.6.3 => 1.2.6.4 ===
--- ZODB3/ZEO/zeopasswd.py:1.2.6.3	Thu Dec 18 21:59:54 2003
+++ ZODB3/ZEO/zeopasswd.py	Tue Dec 23 07:03:58 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