Use old-style unittest.TestCase.assertRaises for python2.6 support

The python>=2.7 preferred call to this method as a context manager is
not available in python2.6.