Opened 12 years ago
Closed 12 years ago
#18735 closed Bug (invalid)
unittest urlconf not picked up by reverse before first request
Reported by: | digi604 | Owned by: | nobody |
---|---|---|---|
Component: | Core (URLs) | Version: | 1.4 |
Severity: | Normal | Keywords: | |
Cc: | ojiidotch@… | Triage Stage: | Unreviewed |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | yes |
Easy pickings: | no | UI/UX: | no |
Description
If your test class has a "urls" property defined it will not be picket up by reverse() before you make a request.
Change History (5)
comment:1 by , 12 years ago
comment:3 by , 12 years ago
Component: | Uncategorized → Core (URLs) |
---|---|
Has patch: | set |
Patch needs improvement: | set |
Type: | Uncategorized → Bug |
Cannot reproduce with the instructions above, however I can reproduce it in the test suite of a 3rd party app, namely django-cms.
The original bug in django-cms can be found at https://github.com/divio/django-cms/pull/1360 and can be fixed by applying https://github.com/divio/django-cms/pull/1375 (which is the same as the patch proposed here).
So while the instructions to reproduce the issue seem to be flawed, the patch looks good to me.
comment:4 by , 12 years ago
Cc: | added |
---|
comment:5 by , 12 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
turned out to be an issue in the django-cms test suite.
if the reverse testsuite is run on its own the tests fail:
./tests/runtests.py --settings=settings -v1 urlpatterns_reverse.URLPatternReverse