#20917: Change the password hashers when testing
-----------------------------------+--------------------------------------
     Reporter:  Marc Tamlyn        |                    Owner:  Bruno Alla
         Type:  New feature        |                   Status:  closed
    Component:  Testing framework  |                  Version:  master
     Severity:  Normal             |               Resolution:  wontfix
     Keywords:                     |             Triage Stage:  Unreviewed
    Has patch:  0                  |      Needs documentation:  0
  Needs tests:  0                  |  Patch needs improvement:  0
Easy pickings:  0                  |                    UI/UX:  0
-----------------------------------+--------------------------------------

Comment (by Adam (Chainz) Johnson):

 Here's such a patch:

 {{{
 diff --git django/test/utils.py django/test/utils.py
 index d1f7d19546..6b3e9648ab 100644
 --- django/test/utils.py
 +++ django/test/utils.py
 @@ -128,6 +128,8 @@ def setup_test_environment(debug=None):
      saved_data.email_backend = settings.EMAIL_BACKEND
      settings.EMAIL_BACKEND =
 'django.core.mail.backends.locmem.EmailBackend'

 +    settings.PASSWORD_HASHERS =
 ['django.contrib.auth.hashers.MD5PasswordHasher']
 +
      saved_data.template_render = Template._render
      Template._render = instrumented_test_render


 }}}

 But I'm not sure how I feel about it. It's a coupling of the test runner
 to a contrib app.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/20917#comment:17>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.adbe663b4a233b2c04acb0e23a2c9d4c%40djangoproject.com.

Reply via email to