Fixed tests for py3.