Opened 8 years ago
Closed 8 years ago
#28246 closed Bug (needsinfo)
modify_settings decorator append operation failing
Reported by: | Mark Rogaski | Owned by: | nobody |
---|---|---|---|
Component: | Testing framework | Version: | 1.11 |
Severity: | Normal | Keywords: | test modify_settings |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
I am using autodiscover_modules
in a project to load app URL configurations. After moving from 1.10.6 to 1.11.1, the test app that I was using for unit testing is failing.
In the project urls.py:
from django.utils.module_loading import autodiscover_modules from myproject import site autodiscover_modules('urls', register_to=site)
In the unit test:
from django.test import TestCase, modify_settings @modify_settings(INSTALLED_APPS={ 'append': 'myproject.tests.testapp' }) class UrlRegistryTest(TestCase): ...
When stepping through with the debugger, I see that INSTALLED_APPS isn't modified when the autodiscover function is called in 1.11.
Change History (3)
follow-up: 2 comment:1 by , 8 years ago
comment:2 by , 8 years ago
Replying to Tim Graham:
Could you bisect to find the commit where the behavior changed?
I'll start looking. Thanks.
comment:3 by , 8 years ago
Resolution: | → needsinfo |
---|---|
Status: | new → closed |
Please reopen if you provide further details. I couldn't reproduce an issue given the minimal details in the ticket.
Could you bisect to find the commit where the behavior changed?