Avoid use of assertIsInstance.

This is new in Python 2.7 and we want to support 2.6 still.