Adjust example.com/org tests. This seems to change every now and then.

This commit is contained in:
Bastian Kleineidam 2013-12-04 19:13:18 +01:00
parent 023da7c993
commit b363945052
13 changed files with 22 additions and 70 deletions

View file

@ -7,7 +7,6 @@ valid
url http://example.com/
cache key http://example.com/
real url http://www.iana.org/domains/example/
real url http://example.com/
name Testlink
info Redirected to `http://www.iana.org/domains/example/'.
valid

View file

@ -12,7 +12,5 @@ valid
url http://www.example.com
cache key http://www.example.com
real url http://www.iana.org/domains/example
info Redirected to `http://www.iana.org/domains/example/'.
info Redirected to `http://www.iana.org/domains/example'.
real url http://www.example.com
valid

View file

@ -7,8 +7,7 @@ valid
url http://www.example.org/
cache key http://www.example.org/
real url http://www.iana.org/domains/example
real url http://www.example.com/
name Example.org
info Redirected to `http://www.iana.org/domains/example/'.
info Redirected to `http://www.iana.org/domains/example'.
info Redirected to `http://www.example.com/'.
valid

View file

@ -6,9 +6,7 @@ valid
url HtTP://WwW.ExaMple.cOm/
cache key http://www.example.com/
real url http://www.iana.org/domains/example
real url http://www.example.com/
name l1
info Redirected to `http://www.iana.org/domains/example/'.
info Redirected to `http://www.iana.org/domains/example'.
valid

View file

@ -6,10 +6,8 @@ valid
url http://example.com/
cache key http://example.com/
real url http://www.iana.org/domains/example
real url http://example.com/
name unquoted
info Redirected to `http://www.iana.org/domains/example/'.
info Redirected to `http://www.iana.org/domains/example'.
valid
url /stalter&sohn
@ -20,8 +18,6 @@ error
url http://www.example.com/
cache key http://www.example.com/
real url http://www.iana.org/domains/example
real url http://www.example.com/
name no beginning quote example
info Redirected to `http://www.iana.org/domains/example/'.
info Redirected to `http://www.iana.org/domains/example'.
valid

View file

@ -6,10 +6,8 @@ valid
url http://www.example.com/1
cache key http://www.example.com/1
real url http://www.iana.org/domains/example
real url http://www.example.com/1
name ok example
info Redirected to `http://www.iana.org/domains/example/'.
info Redirected to `http://www.iana.org/domains/example'.
valid
url http:/www.example.com/2
@ -26,10 +24,8 @@ error
url //www.example.com/4
cache key http://www.example.com/4
real url http://www.iana.org/domains/example
real url http://www.example.com/4
name no scheme example
info Redirected to `http://www.iana.org/domains/example/'.
info Redirected to `http://www.iana.org/domains/example'.
valid
url http://

View file

@ -7,9 +7,7 @@ valid
url http://www.example.com/
cache key http://www.example.com/
real url http://www.iana.org/domains/example
info Redirected to `http://www.iana.org/domains/example/'.
info Redirected to `http://www.iana.org/domains/example'.
real url http://www.example.com/
valid
url favicon.ico

View file

@ -7,16 +7,12 @@ valid
url http://www.example.com/
cache key http://www.example.com/
real url http://www.iana.org/domains/example
real url http://www.example.com/
name Imadoofus
info Redirected to `http://www.iana.org/domains/example/'.
info Redirected to `http://www.iana.org/domains/example'.
valid
url http://www.example.net/
cache key http://www.example.net/
real url http://www.iana.org/domains/example
real url http://www.example.net/
name Imanotherdoofus
info Redirected to `http://www.iana.org/domains/example/'.
info Redirected to `http://www.iana.org/domains/example'.
valid

View file

@ -9,16 +9,12 @@ valid
url http://www.example.com/
cache key http://www.example.com/
real url http://www.iana.org/domains/example
real url http://www.example.com/
name Imadoofus
info Redirected to `http://www.iana.org/domains/example/'.
info Redirected to `http://www.iana.org/domains/example'.
valid
url http://www.example.net/
cache key http://www.example.net/
real url http://www.iana.org/domains/example
real url http://www.example.net/
name Imanotherdoofus
info Redirected to `http://www.iana.org/domains/example/'.
info Redirected to `http://www.iana.org/domains/example'.
valid

View file

@ -6,9 +6,7 @@ valid
url redirect_newhost.html
cache key http://localhost:%(port)d/%(datadir)s/redirect_newhost.html
real url http://www.iana.org/domains/example
real url http://www.example.com/
name redirect to new host
info Redirected to `http://www.example.com/'.
info Redirected to `http://www.iana.org/domains/example/'.
info Redirected to `http://www.iana.org/domains/example'.
valid

View file

@ -39,9 +39,7 @@ class TestHttpMisc (HttpServerTest):
u"valid",
u"url http://www.example.org/",
u"cache key http://www.example.org/",
u"real url http://www.iana.org/domains/example",
u"info Redirected to `http://www.iana.org/domains/example/'.",
u"info Redirected to `http://www.iana.org/domains/example'.",
u"real url http://www.example.org/",
u"valid",
]
self.direct(url, resultlines, recursionlevel=1)

View file

@ -28,16 +28,12 @@ class TestURLLength(LinkCheckTest):
def test_url_warn(self):
url = u"http://www.example.org/%s" % (u"a" * 256)
attrs = self.get_attrs(url=url)
attrs['nurl'] = u"http://www.iana.org/domains/example/"
attrs['rurl'] = u"http://www.iana.org/domains/example"
resultlines = [
u"url %(url)s" % attrs,
u"cache key %(url)s" % attrs,
u"real url %(rurl)s" % attrs,
u"info Redirected to `%(nurl)s'." % attrs,
u"info Redirected to `%(rurl)s'." % attrs,
u"real url %(url)s" % attrs,
u"warning URL length 279 is longer than 255.",
u"valid",
u"error",
]
self.direct(url, resultlines)

View file

@ -29,30 +29,22 @@ class TestWhitespace (LinkCheckTest):
# Leading whitespace
url = u" http://www.example.org/"
attrs = self.get_attrs(url=url)
attrs['nurl'] = "http://www.iana.org/domains/example/"
attrs['rurl'] = "http://www.iana.org/domains/example"
attrs['surl'] = url.strip()
resultlines = [
u"url %(surl)s" % attrs,
u"cache key %(surl)s" % attrs,
u"real url %(rurl)s" % attrs,
u"info Redirected to `%(nurl)s'." % attrs,
u"info Redirected to `%(rurl)s'." % attrs,
u"real url %(surl)s" % attrs,
u"warning Leading or trailing whitespace in URL `%(url)s'." % attrs,
u"valid",
]
self.direct(url, resultlines)
url = u"\nhttp://www.example.org/"
attrs = self.get_attrs(url=url)
attrs['nurl'] = "http://www.iana.org/domains/example/"
attrs['rurl'] = "http://www.iana.org/domains/example"
attrs['surl'] = url.strip()
resultlines = [
u"url %(surl)s" % attrs,
u"cache key %(surl)s" % attrs,
u"real url %(rurl)s" % attrs,
u"info Redirected to `%(nurl)s'." % attrs,
u"info Redirected to `%(rurl)s'." % attrs,
u"real url %(surl)s" % attrs,
u"warning Leading or trailing whitespace in URL `%(url)s'." % attrs,
u"valid",
]
@ -61,27 +53,19 @@ class TestWhitespace (LinkCheckTest):
def test_trailing_whitespace (self):
# Trailing whitespace
url = u"http://www.example.org/ "
nurl = "http://www.iana.org/domains/example/"
rurl = "http://www.iana.org/domains/example"
resultlines = [
u"url %s" % url.strip(),
u"cache key %s" % url.strip(),
u"real url %s" % rurl,
u"info Redirected to `%s'." % nurl,
u"info Redirected to `%s'." % rurl,
u"real url %s" % url.strip(),
u"warning Leading or trailing whitespace in URL `%s'." % url,
u"valid",
]
self.direct(url, resultlines)
url = u"http://www.example.org/\n"
nurl = "http://www.iana.org/domains/example/"
rurl = "http://www.iana.org/domains/example"
resultlines = [
u"url %s" % url.strip(),
u"cache key %s" % url.strip(),
u"real url %s" % rurl,
u"info Redirected to `%s'." % nurl,
u"info Redirected to `%s'." % rurl,
u"real url %s" % url.strip(),
u"warning Leading or trailing whitespace in URL `%s'." % url,
u"valid",
]