fix py2.6 compatibility in test assertion