change some asserts for py2.6