Fix tests to work with python3.2 and PyQt4