packages/python/python-cherrypy/fix-nullbyte-test.patch

15 lines
470 B
Diff

--- a/cherrypy/test/test_static.py
+++ b/cherrypy/test/test_static.py
@@ -398,8 +398,9 @@ class StaticTest(helper.CPWebCase):
self.assertInBody("I couldn't find that thing")
def test_null_bytes(self):
- self.getPage('/static/\x00')
- self.assertStatus('404 Not Found')
+ import http.client
+ with pytest.raises(http.client.InvalidURL):
+ self.getPage('/static/\x00')
@classmethod
def unicode_file(cls):