#30871: override_settings() does not restore partially deleted settings
---------------------------------------------+------------------------
               Reporter:  Hodossy, Szabolcs  |          Owner:  nobody
                   Type:  Bug                |         Status:  new
              Component:  Testing framework  |        Version:  2.2
               Severity:  Normal             |       Keywords:
           Triage Stage:  Unreviewed         |      Has patch:  0
    Needs documentation:  0                  |    Needs tests:  0
Patch needs improvement:  0                  |  Easy pickings:  0
                  UI/UX:  0                  |
---------------------------------------------+------------------------
 When a settings is a dictionary, and only a key in that dicitonary needs
 to be deleted for a test, the @override_settings() decorator does not
 restore the original settings value.

 It is a common practice for apps to use a single settings dictionary for
 their own configuration. A quick example can be seen here with the django-
 auth-adfs package: https://github.com/hodossy/django-auth-adfs at commit
 e11eca87ef96a3a074fc0846feb71183182e53dd.

 To reproduce the issue, you can clone the project, install dependecies and
 run 'python manage.py test' to see test failing with KeyError due to above
 error.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/30871>
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 django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/050.af8574187606207be931198233504f0a%40djangoproject.com.

Reply via email to