From 32d63a05850e5913e55af46dee13e0f77a5337e4 Mon Sep 17 00:00:00 2001 From: Claude Paroz Date: Wed, 13 Aug 2025 20:04:29 +0200 Subject: [PATCH] Tests avec hacheur de mdp MD5 --- stages/management/commands/__init__.py | 0 stages/management/commands/test.py | 10 ++++++++++ 2 files changed, 10 insertions(+) create mode 100644 stages/management/commands/__init__.py create mode 100644 stages/management/commands/test.py diff --git a/stages/management/commands/__init__.py b/stages/management/commands/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/stages/management/commands/test.py b/stages/management/commands/test.py new file mode 100644 index 0000000..e13842f --- /dev/null +++ b/stages/management/commands/test.py @@ -0,0 +1,10 @@ +from django.core.management.commands.test import Command as TestCommand +from django.test.utils import override_settings + + +class Command(TestCommand): + def handle(self, *args, **options): + with override_settings( + PASSWORD_HASHERS=["django.contrib.auth.hashers.MD5PasswordHasher"], + ): + return super().handle(*args, **options)