[test] Fix regressions from 96549de9dd70 "[test] use assertIn where appropriate"
authorJulien Cristau <julien.cristau@logilab.fr>
Thu, 10 Apr 2014 10:59:08 +0200
changeset 9677 f0130c270793
parent 9676 3f62606c01a2
child 9679 a3a516cf8624
[test] Fix regressions from 96549de9dd70 "[test] use assertIn where appropriate"
server/test/unittest_ldapsource.py
web/test/unittest_webconfig.py
--- a/server/test/unittest_ldapsource.py	Wed Apr 09 18:14:45 2014 +0200
+++ b/server/test/unittest_ldapsource.py	Thu Apr 10 10:59:08 2014 +0200
@@ -241,7 +241,7 @@
         self.assertMetadata(e)
         self.assertEqual(e.firstname, None)
         self.assertEqual(e.surname, None)
-        self.assertIn('users' in [g.name for g, e.in_group])
+        self.assertIn('users', set(g.name for g in e.in_group))
         self.assertEqual(e.owned_by[0].login, 'syt')
         self.assertEqual(e.created_by, ())
         addresses = [pe.address for pe in e.use_email]
--- a/web/test/unittest_webconfig.py	Wed Apr 09 18:14:45 2014 +0200
+++ b/web/test/unittest_webconfig.py	Thu Apr 10 10:59:08 2014 +0200
@@ -42,7 +42,7 @@
         rname = self.config.uiprops['FILE_ICON'].replace(self.config.datadir_url, '')
         self.assertIn('file', self.config.locate_resource(rname)[0].split(os.sep))
         cubicwebcsspath = self.config.locate_resource('cubicweb.css')[0].split(os.sep)
-        self.assertIn('web' in cubicwebcsspath or 'shared', cubicwebcsspath) # 'shared' if tests under apycot
+        self.assertTrue('web' in cubicwebcsspath or 'shared' in cubicwebcsspath) # 'shared' if tests under apycot
 
     def test_sign_text(self):
         signature = self.config.sign_text(u'hôp')