Got rid of assertRaisesRegexp in tests for 2.6 compatibility