[Py3] fixes for tests