update unittests for python 3 as well as python 2.