Python 3.x unit tests fixed