Fix tests so that they run on Python 3.2