Merge pull request #417 from cjmayo/test_network

Adjust tests for need_network
This commit is contained in:
Chris Mayo 2020-05-26 19:31:30 +01:00 committed by GitHub
commit b56cb634e6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 6 deletions

View file

@ -22,7 +22,7 @@ import zipfile
import pytest
from tests import need_word, need_pdflib
from tests import need_network, need_word, need_pdflib
from . import LinkCheckTest, get_file
@ -48,6 +48,7 @@ class TestFile(LinkCheckTest):
def test_html(self):
self.file_test("file.html")
@need_network
def test_html_url_quote(self):
self.file_test("file_url_quote.html")

View file

@ -28,17 +28,20 @@ class TestHttp(HttpServerTest):
self.handler = CookieRedirectHttpRequestHandler
@need_network
def test_html(self):
def test_html_internet(self):
confargs = dict(recursionlevel=1)
self.file_test("http.html", confargs=confargs)
self.file_test("http_lowercase.html", confargs=confargs)
self.file_test("http_quotes.html", confargs=confargs)
self.file_test("http_slash.html", confargs=confargs)
self.file_test("http.xhtml", confargs=confargs)
self.file_test("http_url_quote.html", confargs=confargs)
def test_html(self):
confargs = dict(recursionlevel=1)
self.file_test("http_empty.html", confargs=confargs)
self.file_test("http_file.html", confargs=confargs)
self.file_test("http_utf8.html", confargs=confargs)
self.file_test("http_url_quote.html", confargs=confargs)
self.file_test("http_empty.html", confargs=confargs)
self.file_test("http.xhtml", confargs=confargs)
def test_status(self):
for status in sorted(self.handler.responses.keys()):

View file

@ -51,7 +51,6 @@ class TestHttps(HttpsServerTest):
with open(get_file("https_cert.pem"), "wb") as f:
f.write(crypto.dump_certificate(crypto.FILETYPE_PEM, cert))
@need_network
def test_https(self):
url = self.get_url("")
resultlines = [