Fix Python 2.6 compatibility

Use of assertRaises and therefore assert_raises as a context manager
was only enabled in Python 2.7 and never backported.
http://docs.python.org/2/library/unittest.html#unittest.TestCase.assertRaises