Except if there is a particular message that comes with the AttributeError, in which case I would restore the assertRaisesRegexp call.