#19903: Exception in servers tests tear down -----------------------------------+------------------------------------ Reporter: aaugustin | Owner: nobody Type: Bug | Status: new Component: Testing framework | Version: master Severity: Normal | Resolution: Keywords: | Triage Stage: Accepted Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -----------------------------------+------------------------------------
Comment (by claudep): The culprit is the `LiveServerAddress` test case. Parent `setUpClass` is called 8 times (because `raises_exception` manually calls it), while `tearDownClass` is called only one time. So we have 8 `settings_override.enable()` balanced by only one `settings_override.disable()`. Consequently, the settings object we get in `teardown_test_environment` is one of the overriden settings instance, not the initial one, hence the absence of `_original_allowed_hosts` attribute. -- Ticket URL: <https://code.djangoproject.com/ticket/19903#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 post to this group, send email to django-updates@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.