getting a StringIO here was due to lgc.db sqlite adapter bug stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 27 May 2009 11:19:37 +0200
branchstable
changeset 1951 f28e7f300d3f
parent 1950 ab7a41b2cd26
child 1952 8e19c813750d
getting a StringIO here was due to lgc.db sqlite adapter bug
server/test/unittest_querier.py
--- a/server/test/unittest_querier.py	Wed May 27 11:18:46 2009 +0200
+++ b/server/test/unittest_querier.py	Wed May 27 11:19:37 2009 +0200
@@ -1080,7 +1080,7 @@
         cursor = self.pool['system']
         cursor.execute("SELECT %supassword from %sCWUser WHERE %slogin='bob'"
                        % (SQL_PREFIX, SQL_PREFIX, SQL_PREFIX))
-        passwd = cursor.fetchone()[0].getvalue()
+        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)
         self.assertEquals(len(rset.rows), 1)
@@ -1094,7 +1094,7 @@
                             {'pwd': 'tutu'})
         cursor.execute("SELECT %supassword from %sCWUser WHERE %slogin='bob'"
                        % (SQL_PREFIX, SQL_PREFIX, SQL_PREFIX))
-        passwd = cursor.fetchone()[0].getvalue()
+        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)
         self.assertEquals(len(rset.rows), 1)