Removed context manager-based assertRaises checks in unit tests for < python2.7 support