equal
deleted
inserted
replaced
44 self.create_user('toto') |
44 self.create_user('toto') |
45 email1 = self.execute('INSERT EmailAddress E: E address "client@client.com", U use_email E WHERE U login "admin"')[0][0] |
45 email1 = self.execute('INSERT EmailAddress E: E address "client@client.com", U use_email E WHERE U login "admin"')[0][0] |
46 self.commit() |
46 self.commit() |
47 cnx = self.login('toto') |
47 cnx = self.login('toto') |
48 cu = cnx.cursor() |
48 cu = cnx.cursor() |
49 cu.execute('SET U primary_email E WHERE E eid %(e)s, U login "toto"', |
49 self.assertRaises(Unauthorized, |
50 {'e': email1}) |
50 cu.execute, 'SET U primary_email E WHERE E eid %(e)s, U login "toto"', |
51 self.assertRaises(Unauthorized, cnx.commit) |
51 {'e': email1}) |
52 |
52 cnx.close() |
53 |
53 |
54 if __name__ == '__main__': |
54 if __name__ == '__main__': |
55 from logilab.common.testlib import unittest_main |
55 from logilab.common.testlib import unittest_main |
56 unittest_main() |
56 unittest_main() |