Fixed broken tests for python 3.*