#30871: override_settings() does not restore partially deleted settings.
     Reporter:  Hodossy, Szabolcs  |                    Owner:  nobody
         Type:  Bug                |                   Status:  closed
    Component:  Testing framework  |                  Version:  master
     Severity:  Normal             |               Resolution:  invalid
     Keywords:                     |             Triage Stage:  Unreviewed
    Has patch:  0                  |      Needs documentation:  0
  Needs tests:  0                  |  Patch needs improvement:  0
Easy pickings:  0                  |                    UI/UX:  0
Changes (by felixxm):

 * status:  new => closed
 * version:  2.2 => master
 * resolution:   => invalid


 Thanks for this report, however it is not a valid usage of the
 `override_settings()` decorator (see
 documentation]). You can simulate the absence of a setting, but you cannot
 modify it partially with `override_settings()`. You should rather create a
 local copy and override the setting e.g.

     def test_access_callback_azure(self):
         auth_adfs_setting = settings.AUTH_ADFS.copy()
         del auth_adfs_setting["SERVER"]
         with self.settings(AUTH_ADFS=auth_adfs_setting):

 Closing per TicketClosingReasons/UseSupportChannels.

Ticket URL: <https://code.djangoproject.com/ticket/30871#comment:1>
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 

Reply via email to