mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-14 02:26:58 -07:00
Revert "Bump cherrypy from 18.8.0 to 18.9.0 (#2266)"
This reverts commit faef9a94c4
.
This commit is contained in:
parent
fcd8ef11f4
commit
2fc618c01f
673 changed files with 11579 additions and 159846 deletions
|
@ -136,9 +136,6 @@ class HTTPTests(helper.CPWebCase):
|
|||
self.assertStatus(200)
|
||||
self.assertBody(b'Hello world!')
|
||||
|
||||
response.close()
|
||||
c.close()
|
||||
|
||||
# Now send a message that has no Content-Length, but does send a body.
|
||||
# Verify that CP times out the socket and responds
|
||||
# with 411 Length Required.
|
||||
|
@ -162,9 +159,6 @@ class HTTPTests(helper.CPWebCase):
|
|||
self.status = str(response.status)
|
||||
self.assertStatus(411)
|
||||
|
||||
response.close()
|
||||
c.close()
|
||||
|
||||
def test_post_multipart(self):
|
||||
alphabet = 'abcdefghijklmnopqrstuvwxyz'
|
||||
# generate file contents for a large post
|
||||
|
@ -190,9 +184,6 @@ class HTTPTests(helper.CPWebCase):
|
|||
parts = ['%s * 65536' % ch for ch in alphabet]
|
||||
self.assertBody(', '.join(parts))
|
||||
|
||||
response.close()
|
||||
c.close()
|
||||
|
||||
def test_post_filename_with_special_characters(self):
|
||||
"""Testing that we can handle filenames with special characters.
|
||||
|
||||
|
@ -226,9 +217,6 @@ class HTTPTests(helper.CPWebCase):
|
|||
self.assertStatus(200)
|
||||
self.assertBody(fname)
|
||||
|
||||
response.close()
|
||||
c.close()
|
||||
|
||||
def test_malformed_request_line(self):
|
||||
if getattr(cherrypy.server, 'using_apache', False):
|
||||
return self.skip('skipped due to known Apache differences...')
|
||||
|
@ -276,9 +264,6 @@ class HTTPTests(helper.CPWebCase):
|
|||
self.body = response.fp.read(20)
|
||||
self.assertBody('Illegal header line.')
|
||||
|
||||
response.close()
|
||||
c.close()
|
||||
|
||||
def test_http_over_https(self):
|
||||
if self.scheme != 'https':
|
||||
return self.skip('skipped (not running HTTPS)... ')
|
||||
|
|
|
@ -150,8 +150,6 @@ class IteratorTest(helper.CPWebCase):
|
|||
self.assertStatus(200)
|
||||
self.assertBody('0')
|
||||
|
||||
itr_conn.close()
|
||||
|
||||
# Now we do the same check with streaming - some classes will
|
||||
# be automatically closed, while others cannot.
|
||||
stream_counts = {}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
"""Basic tests for the CherryPy core: request handling."""
|
||||
|
||||
import datetime
|
||||
import logging
|
||||
|
||||
from cheroot.test import webtest
|
||||
|
@ -198,33 +197,6 @@ def test_custom_log_format(log_tracker, monkeypatch, server):
|
|||
)
|
||||
|
||||
|
||||
def test_utc_in_timez(monkeypatch):
|
||||
"""Test that ``LazyRfc3339UtcTime`` is rendered as ``str`` using UTC timestamp."""
|
||||
utcoffset8_local_time_in_naive_utc = (
|
||||
datetime.datetime(
|
||||
year=2020,
|
||||
month=1,
|
||||
day=1,
|
||||
hour=1,
|
||||
minute=23,
|
||||
second=45,
|
||||
tzinfo=datetime.timezone(datetime.timedelta(hours=8)),
|
||||
)
|
||||
.astimezone(datetime.timezone.utc)
|
||||
.replace(tzinfo=None)
|
||||
)
|
||||
|
||||
class mock_datetime:
|
||||
@classmethod
|
||||
def utcnow(cls):
|
||||
return utcoffset8_local_time_in_naive_utc
|
||||
|
||||
monkeypatch.setattr('datetime.datetime', mock_datetime)
|
||||
rfc3339_utc_time = str(cherrypy._cplogging.LazyRfc3339UtcTime())
|
||||
expected_time = '2019-12-31T17:23:45Z'
|
||||
assert rfc3339_utc_time == expected_time
|
||||
|
||||
|
||||
def test_timez_log_format(log_tracker, monkeypatch, server):
|
||||
"""Test a customized access_log_format string, which is a
|
||||
feature of _cplogging.LogManager.access()."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue