mirror of
https://github.com/webrecorder/pywb.git
synced 2025-03-24 06:59:52 +01:00
Temporarily comment out bad content length tests
This commit is contained in:
parent
d253d2bd43
commit
b6e4037fc6
@ -91,25 +91,28 @@ class TestLiveRewriter(HttpBinLiveTests, BaseConfigTest):
|
|||||||
resp = self.head('/live/{0}httpbin.org/get?foo=bar', fmod_sl)
|
resp = self.head('/live/{0}httpbin.org/get?foo=bar', fmod_sl)
|
||||||
assert resp.status_int == 200
|
assert resp.status_int == 200
|
||||||
|
|
||||||
@pytest.mark.skipif(sys.version_info < (3,0), reason='does not respond in 2.7')
|
# Following tests are temporarily commented out because latest version of PSF httpbin
|
||||||
def test_live_bad_content_length(self, fmod_sl):
|
# now returns 400 if content-length header isn't parsable as an int
|
||||||
resp = self.get('/live/{0}httpbin.org/response-headers?content-length=149,149', fmod_sl, status=200)
|
|
||||||
assert resp.headers['Content-Length'] == '149'
|
|
||||||
|
|
||||||
resp = self.get('/live/{0}httpbin.org/response-headers?Content-Length=xyz', fmod_sl, status=200)
|
# @pytest.mark.skipif(sys.version_info < (3,0), reason='does not respond in 2.7')
|
||||||
assert resp.headers['Content-Length'] == '90'
|
# def test_live_bad_content_length(self, fmod_sl):
|
||||||
|
# resp = self.get('/live/{0}httpbin.org/response-headers?content-length=149,149', fmod_sl, status=200)
|
||||||
|
# assert resp.headers['Content-Length'] == '149'
|
||||||
|
|
||||||
@pytest.mark.skipif(sys.version_info < (3,0), reason='does not respond in 2.7')
|
# resp = self.get('/live/{0}httpbin.org/response-headers?Content-Length=xyz', fmod_sl, status=200)
|
||||||
def test_live_bad_content_length_with_range(self, fmod_sl):
|
# assert resp.headers['Content-Length'] == '90'
|
||||||
resp = self.get('/live/{0}httpbin.org/response-headers?content-length=149,149', fmod_sl,
|
|
||||||
headers={'Range': 'bytes=0-'}, status=206)
|
|
||||||
assert resp.headers['Content-Length'] == '149'
|
|
||||||
assert resp.headers['Content-Range'] == 'bytes 0-148/149'
|
|
||||||
|
|
||||||
resp = self.get('/live/{0}httpbin.org/response-headers?Content-Length=xyz', fmod_sl,
|
# @pytest.mark.skipif(sys.version_info < (3,0), reason='does not respond in 2.7')
|
||||||
headers={'Range': 'bytes=0-'}, status=206)
|
# def test_live_bad_content_length_with_range(self, fmod_sl):
|
||||||
assert resp.headers['Content-Length'] == '90'
|
# resp = self.get('/live/{0}httpbin.org/response-headers?content-length=149,149', fmod_sl,
|
||||||
assert resp.headers['Content-Range'] == 'bytes 0-89/90'
|
# headers={'Range': 'bytes=0-'}, status=206)
|
||||||
|
# assert resp.headers['Content-Length'] == '149'
|
||||||
|
# assert resp.headers['Content-Range'] == 'bytes 0-148/149'
|
||||||
|
|
||||||
|
# resp = self.get('/live/{0}httpbin.org/response-headers?Content-Length=xyz', fmod_sl,
|
||||||
|
# headers={'Range': 'bytes=0-'}, status=206)
|
||||||
|
# assert resp.headers['Content-Length'] == '90'
|
||||||
|
# assert resp.headers['Content-Range'] == 'bytes 0-89/90'
|
||||||
|
|
||||||
def test_custom_unicode_header(self, fmod_sl):
|
def test_custom_unicode_header(self, fmod_sl):
|
||||||
value = u'⛄'
|
value = u'⛄'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user