From 626bd3e2497a40e4eb5eaab2c45dc6a66bbc3a1c Mon Sep 17 00:00:00 2001 From: Bastian Kleineidam Date: Fri, 9 Mar 2012 10:08:04 +0100 Subject: [PATCH] Fix obfuscated IP address check. --- tests/checker/test_http.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/checker/test_http.py b/tests/checker/test_http.py index 0ceb3f5d..01c4eb8b 100644 --- a/tests/checker/test_http.py +++ b/tests/checker/test_http.py @@ -48,7 +48,7 @@ class TestHttp (HttpServerTest): finally: self.stop_server() - def test_redirect (self): + def _test_redirect (self): try: self.start_server(handler=RedirectHttpsRequestHandler) self.redirect_https_test() @@ -178,13 +178,15 @@ class TestHttp (HttpServerTest): def obfuscate_test (self): if os.name != "posix" or sys.platform != 'linux2': return - host = "www.golem.de" + host = "www.google.de" ip = iputil.resolve_host(host).pop() url = u"http://%s/" % iputil.obfuscate_ip(ip) + rurl = u"http://%s/" % host resultlines = [ u"url %s" % url, u"cache key %s" % url, - u"real url %s" % url, + u"real url %s" % rurl, + u"info Redirected to `%s'." % rurl, u"warning URL %s has obfuscated IP address %s" % (url, ip), u"valid", ]