# HG changeset patch # User Sylvain Thénault # Date 1261555141 -3600 # Node ID c9526b1ffb1dfbf7a14bddf1fb6752ba153aa8e9 # Parent 8d644eb862b994c906fbe91446e71fe966f58068 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. diff -r 8d644eb862b9 -r c9526b1ffb1d server/test/unittest_querier.py --- 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',)])