Excellent point - I had not considered this.  Your comment is good.  If we wanted to go one step further we could create a subclass of the exception like Test_HTTP_Exception which takes the code separately and guarantees that we don't leak it, then expect that in the test.  I'm not too worried though.