tests: port to py3