Fix syntax compatibility of test suite with Python 3.2