Commits

Gustavo Picon committed b71f083

No longer using assertIsinstance (is 2.7+ only)

Comments (0)

Files changed (2)

cherrypy/test/test_states.py

             with warnings.catch_warnings(record=True) as w:
                 servers.wait_for_occupied_port('0.0.0.0', free_port)
                 self.assertEqual(len(w), 1)
-                self.assertIsInstance(w[0], warnings.WarningMessage)
+                self.assertTrue(isinstance(w[0], warnings.WarningMessage))
                 self.assertIn('Unable to verify that the server is bound on ',
                               str(w[0]))
 

cherrypy/test/test_tools.py

         sa = cherrypy.lib.cptools.SessionAuth()
         res = sa.login_screen(None, username=unicodestr('nobody'),
                               password=unicodestr('anypass'))
-        self.assertIsInstance(res, bytestr)
+        self.assertTrue(isinstance(res, bytestr))