Avoid use of assertIsInstance.

This is new in Python 2.7 and in setup.py we still claim to support 2.6.