Replace assertRaisesRegex