mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-03-16 22:10:26 +00:00
Fix http tests failing with pytest due to missing _()
TypeError: 'NoneType' object is not callable Ensure LinkCheckTest.setUp() is called to initialise translations.
This commit is contained in:
parent
8b2fb86895
commit
2cbff49221
1 changed files with 4 additions and 4 deletions
|
|
@ -161,9 +161,10 @@ class HttpServerTest(LinkCheckTest):
|
|||
self.port = None
|
||||
self.handler = NoQueryHttpRequestHandler
|
||||
|
||||
def setUp(self):
|
||||
def setUp(self, https=False):
|
||||
"""Start a new HTTP server in a new thread."""
|
||||
self.port = start_server(self.handler)
|
||||
super().setUp()
|
||||
self.port = start_server(self.handler, https)
|
||||
assert self.port is not None
|
||||
|
||||
def tearDown(self):
|
||||
|
|
@ -182,8 +183,7 @@ class HttpsServerTest(HttpServerTest):
|
|||
|
||||
def setUp(self):
|
||||
"""Start a new HTTPS server in a new thread."""
|
||||
self.port = start_server(self.handler, https=True)
|
||||
assert self.port is not None
|
||||
super().setUp(https=True)
|
||||
|
||||
def tearDown(self):
|
||||
"""Send QUIT request to http server."""
|
||||
|
|
|
|||
Loading…
Reference in a new issue