Do not use a context manager with assertRaises

This is for python2.6 compatibility.