Opened 8 years ago

Closed 8 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: UI/UX:


/tests/regressiontests/forms/ changes MEDIA_URL to '', 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/", 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/", line unknown line number, in WIDGETS_TESTS

File "/home/al3x/programy/django_git/tests/regressiontests/admin_widgets/", line ?, in regressiontests.admin_widgets.models.__test__.WIDGETS_TESTS
Failed example:
    print conditional_escape(w.render('test', 'test'))
    Currently: <a target="_blank" href="test">test</a> <br />Change: <input type="file" name="test" />
    Currently: <a target="_blank" href="">test</a> <br />Change: <input type="file" name="test" />


Attachments (1)

forms_media_test.patch (767 bytes) - added by ales_zoulek 8 years ago.

Download all attachments as: .zip

Change History (4)

comment:1 Changed 8 years ago by brosner

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Ready for checkin

Changed 8 years ago by ales_zoulek

comment:2 Changed 8 years ago by ales_zoulek

  • Has patch set

comment:3 Changed 8 years ago by brosner

  • Resolution set to fixed
  • Status changed from new to closed

(In [7273]) newforms-admin: Fixed #6802 -- regressiontests/forms/ perserves the MEDIA_URL once finished. Thanks, ales_zoulek.

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