mirror of
https://github.com/Kozea/Radicale.git
synced 2025-08-10 18:40:53 +00:00
fix for pytest warning: "is using nose-specific method: setup(self)
"
This commit is contained in:
parent
f3f3995b01
commit
6f7abbcba5
5 changed files with 18 additions and 18 deletions
|
@ -54,8 +54,8 @@ class TestBaseServerRequests(BaseTest):
|
|||
thread: threading.Thread
|
||||
opener: request.OpenerDirector
|
||||
|
||||
def setup(self) -> None:
|
||||
super().setup()
|
||||
def setup_method(self) -> None:
|
||||
super().setup_method()
|
||||
self.shutdown_socket, shutdown_socket_out = socket.socketpair()
|
||||
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock:
|
||||
# Find available port
|
||||
|
@ -74,13 +74,13 @@ class TestBaseServerRequests(BaseTest):
|
|||
request.HTTPSHandler(context=ssl_context),
|
||||
DisabledRedirectHandler)
|
||||
|
||||
def teardown(self) -> None:
|
||||
def teardown_method(self) -> None:
|
||||
self.shutdown_socket.close()
|
||||
try:
|
||||
self.thread.join()
|
||||
except RuntimeError: # Thread never started
|
||||
pass
|
||||
super().teardown()
|
||||
super().teardown_method()
|
||||
|
||||
def request(self, method: str, path: str, data: Optional[str] = None,
|
||||
check: Optional[int] = None, **kwargs
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue