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 digi604, 12 years ago

if the reverse testsuite is run on its own the tests fail:

./tests/runtests.py --settings=settings -v1 urlpatterns_reverse.URLPatternReverse

comment:3 by Jonas Obrist, 12 years ago

Component: UncategorizedCore (URLs)
Has patch: set
Patch needs improvement: set
Type: UncategorizedBug

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 Jonas Obrist, 12 years ago

Cc: ojiidotch@… added

comment:5 by Jonas Obrist, 12 years ago

Resolution: invalid
Status: newclosed

turned out to be an issue in the django-cms test suite.

Note: See TracTickets for help on using tickets.
Back to Top