diff -r 0288f8e5460c -r 6f8b925a29f4 sobjects/test/unittest_email.py --- a/sobjects/test/unittest_email.py Tue Feb 23 20:22:40 2010 +0100 +++ b/sobjects/test/unittest_email.py Tue Feb 23 20:23:46 2010 +0100 @@ -46,10 +46,10 @@ self.commit() cnx = self.login('toto') cu = cnx.cursor() - cu.execute('SET U primary_email E WHERE E eid %(e)s, U login "toto"', - {'e': email1}) - self.assertRaises(Unauthorized, cnx.commit) - + self.assertRaises(Unauthorized, + cu.execute, 'SET U primary_email E WHERE E eid %(e)s, U login "toto"', + {'e': email1}) + cnx.close() if __name__ == '__main__': from logilab.common.testlib import unittest_main