Use assertIsInstance in tests.

Gives much nicer errors when it fails.
Merge pull request #1192 from mjtamlyn/assertIsInstance

Use assertIsInstance in test code.