Speedup the tests by using a weaker hash algorythm

This commit is contained in:
Alexis Métaireau 2023-08-15 19:43:17 +02:00
parent b4bdfb8cf4
commit 7373a99aec
3 changed files with 11 additions and 4 deletions

View file

@ -37,3 +37,11 @@ def simple_grouped_order(other_user):
grouped_order.save()
item = Item.objects.create(name="test item", grouped_order=grouped_order, price=2)
return grouped_order
@pytest.fixture(autouse=True)
def password_hasher_setup(settings):
# Use a weaker password hasher during tests, for speed
settings.PASSWORD_HASHERS = [
"django.contrib.auth.hashers.MD5PasswordHasher",
]

View file

@ -1,10 +1,9 @@
import html2text
from django.conf import settings
from django.core import mail
from django.template.loader import render_to_string
from django.utils.html import strip_tags
from la_chariotte import settings
def send_order_confirmation_mail(order):
template_name = "mail/order_confirm_mail.html"