Making unit test python2 compatible