unittest fixes for python2