Permalink
Browse files

newforms-admin: Fixed #6802 -- regressiontests/forms/media.py perserv…

…es the MEDIA_URL once finished. Thanks, ales_zoulek.

git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@7273 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent e998204 commit 46783a0db8af24dda09ab5b2988d018fd0e57b65 @brosner brosner committed Mar 17, 2008
Showing with 2 additions and 0 deletions.
  1. +2 −0 tests/regressiontests/forms/media.py
@@ -4,6 +4,7 @@
media_tests = r"""
>>> from django.newforms import TextInput, Media, TextInput, CharField, Form, MultiWidget
>>> from django.conf import settings
+>>> ORIGINAL_MEDIA_URL = settings.MEDIA_URL
>>> settings.MEDIA_URL = 'http://media.example.com/media/'
# Check construction of media objects
@@ -354,4 +355,5 @@
<script type="text/javascript" src="/path/to/js4"></script>
<script type="text/javascript" src="/some/form/javascript"></script>
+>>> settings.MEDIA_URL = ORIGINAL_MEDIA_URL
"""

0 comments on commit 46783a0

Please sign in to comment.