must now properly use Binary for password (see 4180:42247d70105b). XXX Though this is somewhat backend related (eg store password using a binary type), this should be either well document or handled properly in the db helper.
--- a/server/test/unittest_querier.py Wed Dec 23 08:56:38 2009 +0100
+++ b/server/test/unittest_querier.py Wed Dec 23 08:59:01 2009 +0100
@@ -1079,7 +1079,8 @@
% (SQL_PREFIX, SQL_PREFIX, SQL_PREFIX))
passwd = str(cursor.fetchone()[0])
self.assertEquals(passwd, crypt_password('toto', passwd[:2]))
- rset = self.execute("Any X WHERE X is CWUser, X login 'bob', X upassword '%s'" % passwd)
+ rset = self.execute("Any X WHERE X is CWUser, X login 'bob', X upassword %(pwd)s",
+ {'pwd': Binary(passwd)})
self.assertEquals(len(rset.rows), 1)
self.assertEquals(rset.description, [('CWUser',)])
@@ -1093,7 +1094,8 @@
% (SQL_PREFIX, SQL_PREFIX, SQL_PREFIX))
passwd = str(cursor.fetchone()[0])
self.assertEquals(passwd, crypt_password('tutu', passwd[:2]))
- rset = self.execute("Any X WHERE X is CWUser, X login 'bob', X upassword '%s'" % passwd)
+ rset = self.execute("Any X WHERE X is CWUser, X login 'bob', X upassword %(pwd)s",
+ {'pwd': Binary(passwd)})
self.assertEquals(len(rset.rows), 1)
self.assertEquals(rset.description, [('CWUser',)])