class StaticFileTest(WebTestCase):
- # The expected MD5 hash of robots.txt, used in tests that call
+ # The expected SHA-512 hash of robots.txt, used in tests that call
# StaticFileHandler.get_version
- robots_txt_hash = b"f71d20196d4caf35b6a670db8c70b03d"
+ robots_txt_hash = (
+ b"63a36e950e134b5217e33c763e88840c10a07d80e6057d92b9ac97508de7fb1f"
+ b"a6f0e9b7531e169657165ea764e8963399cb6d921ffe6078425aaafe54c04563"
+ )
static_dir = os.path.join(os.path.dirname(__file__), "static")
def get_handlers(self):
"""Returns a version string for the resource at the given path.
This class method may be overridden by subclasses. The
- default implementation is a hash of the file's contents.
+ default implementation is a SHA-512 hash of the file's contents.
.. versionadded:: 3.1
"""
data = cls.get_content(abspath)
- hasher = hashlib.md5()
+ hasher = hashlib.sha512()
if isinstance(data, bytes):
hasher.update(data)
else: