diff -r 57ed1e24f8f3 Lib/test/test_urllib.py --- a/Lib/test/test_urllib.py Sun Oct 09 11:54:42 2011 +0200 +++ b/Lib/test/test_urllib.py Sun Oct 09 17:07:10 2011 +0100 @@ -231,8 +231,13 @@ Content-Type: text/html; charset=iso-8859-1 ''') try: - self.assertRaises(urllib.error.HTTPError, urlopen, - "http://python.org/") + with self.assertRaises(urllib.error.HTTPError) as cm: + urlopen("http://python.org/") + the_exception = cm.exception + self.assertEquals( + the_exception.msg, + "Found Redirection to url 'file://guidocomputer.athome." + "com:/python/license' is not allowed.") finally: self.unfakehttp()