replace python asserts with test asserts (but not assertIsInstance because of py2.6)