Fix tests under Python 3

Okay, that was pretty easy :smile: