mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-05-04 21:04:41 +00:00
commit
ce0a151c8a
5 changed files with 3 additions and 13 deletions
|
|
@ -33,7 +33,7 @@ class TestHttpMetaRobots(HttpServerTest):
|
|||
"""Test <meta name="robots" content="nofollow"> using http."""
|
||||
|
||||
def test_http_meta_robots(self):
|
||||
url = "http://localhost:%d/tests/checker/data/norobots.html" % self.port
|
||||
url = self.get_url("norobots.html")
|
||||
resultlines = [
|
||||
"url %s" % url,
|
||||
"cache key %s" % url,
|
||||
|
|
|
|||
|
|
@ -17,8 +17,6 @@
|
|||
Test http checking.
|
||||
"""
|
||||
|
||||
import pytest
|
||||
|
||||
from tests import need_network
|
||||
from .httpserver import HttpServerTest, CookieRedirectHttpRequestHandler
|
||||
|
||||
|
|
|
|||
|
|
@ -48,8 +48,7 @@ class TestHttpRedirect(HttpServerTest):
|
|||
self.direct(url, resultlines, recursionlevel=0)
|
||||
|
||||
def redirect2(self):
|
||||
url = "http://localhost:%d/tests/checker/data/redirect.html" % \
|
||||
self.port
|
||||
url = self.get_url("redirect.html")
|
||||
nurl = url
|
||||
rurl = url.replace("redirect", "newurl")
|
||||
resultlines = [
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
# -*- coding: iso-8859-1 -*-
|
||||
# Copyright (C) 2005 Joe Wreschnig
|
||||
# Copyright (C) 2005-2010 Bastian Kleineidam
|
||||
#
|
||||
|
|
@ -50,7 +49,7 @@ class TestPo(unittest.TestCase):
|
|||
|
||||
|
||||
class TestGTranslator(unittest.TestCase):
|
||||
"""GTranslator displays a middot · for a space. Unfortunately, it
|
||||
"""GTranslator displays a middot · for a space. Unfortunately, it
|
||||
gets copied with copy-and-paste, what a shame."""
|
||||
|
||||
def test_gtranslator(self):
|
||||
|
|
|
|||
|
|
@ -99,7 +99,6 @@ class TestStrFormat(unittest.TestCase):
|
|||
def test_is_ascii(self):
|
||||
self.assertTrue(linkcheck.strformat.is_ascii("abcd./"))
|
||||
self.assertTrue(not linkcheck.strformat.is_ascii("ä"))
|
||||
self.assertTrue(not linkcheck.strformat.is_ascii("ä"))
|
||||
|
||||
def test_indent(self):
|
||||
s = "bla"
|
||||
|
|
@ -165,7 +164,6 @@ class TestStrFormat(unittest.TestCase):
|
|||
def test_unicode_safe(self):
|
||||
unicode_safe = linkcheck.strformat.unicode_safe
|
||||
self.assertEqual(unicode_safe("a"), "a")
|
||||
self.assertEqual(unicode_safe("a"), "a")
|
||||
|
||||
def test_ascii_safe(self):
|
||||
ascii_safe = linkcheck.strformat.ascii_safe
|
||||
|
|
@ -175,10 +173,6 @@ class TestStrFormat(unittest.TestCase):
|
|||
def test_strip_control_chars(self):
|
||||
strip = linkcheck.strformat.strip_control_chars
|
||||
self.assertEqual(strip(""), "")
|
||||
self.assertEqual(strip(""), "")
|
||||
self.assertEqual(strip("a"), "a")
|
||||
self.assertEqual(strip("a"), "a")
|
||||
self.assertEqual(strip("ä"), "ä")
|
||||
self.assertEqual(strip("ä"), "ä")
|
||||
self.assertEqual(strip("\x01"), "")
|
||||
self.assertEqual(strip("\x01"), "")
|
||||
|
|
|
|||
Loading…
Reference in a new issue