Opened 17 years ago
Closed 17 years ago
#6802 closed (fixed)
NFA: Test for forms changes MEDIA_URL, but it doesn't change it back (may cause test fail)
Reported by: | Ales Zoulek | Owned by: | nobody |
---|---|---|---|
Component: | Forms | Version: | newforms-admin |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
/tests/regressiontests/forms/media.py changes MEDIA_URL to 'http://media.example.com/media/', but test for admin_widgets is constructed using the old MEDIA_URL.
That may cause error in
>>> w = AdminFileWidget() >>> print conditional_escape(w.render('test', 'test'))
====================================================================== FAIL: Doctest: regressiontests.admin_widgets.models.__test__.WIDGETS_TESTS ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/al3x/programy/pythonpath/django/test/_doctest.py", line 2180, in runTest raise self.failureException(self.format_failure(new.getvalue())) AssertionError: Failed doctest test for regressiontests.admin_widgets.models.__test__.WIDGETS_TESTS File "/home/al3x/programy/django_git/tests/regressiontests/admin_widgets/models.py", line unknown line number, in WIDGETS_TESTS ---------------------------------------------------------------------- File "/home/al3x/programy/django_git/tests/regressiontests/admin_widgets/models.py", line ?, in regressiontests.admin_widgets.models.__test__.WIDGETS_TESTS Failed example: print conditional_escape(w.render('test', 'test')) Expected: Currently: <a target="_blank" href="test">test</a> <br />Change: <input type="file" name="test" /> Got: Currently: <a target="_blank" href="http://media.example.com/media/test">test</a> <br />Change: <input type="file" name="test" /> ----------------------------------------------------------------------
Attachments (1)
Change History (4)
comment:1 by , 17 years ago
Triage Stage: | Unreviewed → Ready for checkin |
---|
by , 17 years ago
Attachment: | forms_media_test.patch added |
---|
comment:2 by , 17 years ago
Has patch: | set |
---|
comment:3 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
(In [7273]) newforms-admin: Fixed #6802 -- regressiontests/forms/media.py perserves the MEDIA_URL once finished. Thanks, ales_zoulek.