mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-06 05:01:14 -07:00
Bump cheroot from 8.6.0 to 9.0.0 (#1903)
* Bump cheroot from 8.6.0 to 9.0.0 Bumps [cheroot](https://github.com/cherrypy/cheroot) from 8.6.0 to 9.0.0. - [Release notes](https://github.com/cherrypy/cheroot/releases) - [Changelog](https://github.com/cherrypy/cheroot/blob/main/CHANGES.rst) - [Commits](https://github.com/cherrypy/cheroot/compare/v8.6.0...v9.0.0) --- updated-dependencies: - dependency-name: cheroot dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * Update cheroot==9.0.0 Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> [skip ci]
This commit is contained in:
parent
0a5edebea3
commit
3d378eb583
33 changed files with 287 additions and 851 deletions
|
@ -1,16 +1,13 @@
|
|||
"""Pytest fixtures and other helpers for doing testing by end-users."""
|
||||
|
||||
from __future__ import absolute_import, division, print_function
|
||||
__metaclass__ = type
|
||||
|
||||
from contextlib import closing
|
||||
from contextlib import closing, contextmanager
|
||||
import errno
|
||||
import socket
|
||||
import threading
|
||||
import time
|
||||
import http.client
|
||||
|
||||
import pytest
|
||||
from six.moves import http_client
|
||||
|
||||
import cheroot.server
|
||||
from cheroot.test import webtest
|
||||
|
@ -33,6 +30,7 @@ config = {
|
|||
}
|
||||
|
||||
|
||||
@contextmanager
|
||||
def cheroot_server(server_factory):
|
||||
"""Set up and tear down a Cheroot server instance."""
|
||||
conf = config[server_factory].copy()
|
||||
|
@ -64,14 +62,14 @@ def cheroot_server(server_factory):
|
|||
@pytest.fixture
|
||||
def wsgi_server():
|
||||
"""Set up and tear down a Cheroot WSGI server instance."""
|
||||
for srv in cheroot_server(cheroot.wsgi.Server):
|
||||
with cheroot_server(cheroot.wsgi.Server) as srv:
|
||||
yield srv
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def native_server():
|
||||
"""Set up and tear down a Cheroot HTTP server instance."""
|
||||
for srv in cheroot_server(cheroot.server.HTTPServer):
|
||||
with cheroot_server(cheroot.server.HTTPServer) as srv:
|
||||
yield srv
|
||||
|
||||
|
||||
|
@ -89,9 +87,9 @@ class _TestClient:
|
|||
port=self._port,
|
||||
)
|
||||
conn_cls = (
|
||||
http_client.HTTPConnection
|
||||
http.client.HTTPConnection
|
||||
if self.server_instance.ssl_adapter is None else
|
||||
http_client.HTTPSConnection
|
||||
http.client.HTTPSConnection
|
||||
)
|
||||
return conn_cls(name)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue