Remove unused code

This commit is contained in:
Unrud 2020-02-20 10:41:33 +01:00
parent 8890a4c030
commit d3b632e123
2 changed files with 1 additions and 22 deletions

View File

@ -83,7 +83,6 @@ class ParallelHTTPServer(socketserver.ThreadingMixIn,
return super().finish_request(request, client_address)
def finish_request(self, request, client_address):
"""Don't overwrite this! (Modified by tests.)"""
*client_address, client_socket = client_address
client_address = tuple(client_address)
try:

View File

@ -21,33 +21,13 @@ Tests for Radicale.
"""
import logging
import os
import sys
from io import BytesIO
import defusedxml.ElementTree as DefusedET
from pytest_cov import embed
import radicale
from radicale import server, xmlutils
# Measure coverage of forked processes
finish_request = server.ParallelHTTPServer.finish_request
pid = os.getpid()
def finish_request_cov(self, request, client_address):
cov = None
if pid != os.getpid():
cov = embed.init()
try:
return finish_request(self, request, client_address)
finally:
if cov:
embed.cleanup(cov)
server.ParallelHTTPServer.finish_request = finish_request_cov
from radicale import xmlutils
# Enable debug output
radicale.log.logger.setLevel(logging.DEBUG)