diff options
Diffstat (limited to 'django/test/runner.py')
-rw-r--r-- | django/test/runner.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/test/runner.py b/django/test/runner.py index 34480cf103..09ac4e142a 100644 --- a/django/test/runner.py +++ b/django/test/runner.py @@ -1,7 +1,6 @@ import argparse import ctypes import faulthandler -import hashlib import io import itertools import logging @@ -26,6 +25,7 @@ from django.test.utils import ( setup_databases as _setup_databases, setup_test_environment, teardown_databases as _teardown_databases, teardown_test_environment, ) +from django.utils.crypto import new_hash from django.utils.datastructures import OrderedSet from django.utils.deprecation import RemovedInDjango50Warning @@ -509,7 +509,7 @@ class Shuffler: @classmethod def _hash_text(cls, text): - h = hashlib.new(cls.hash_algorithm) + h = new_hash(cls.hash_algorithm, usedforsecurity=False) h.update(text.encode('utf-8')) return h.hexdigest() |