Fix assertIsNotNone() in Python 2.6