fixed python2.6 incompatible usage of assertRaises as context manager.