          """
          MEDIA_URL raises an DeprecationWarning error if it doesn't end in a
          slash.
          """
          import warnings
          warnings.filterwarnings('error', 'If set, MEDIA_URL must end with a slash', DeprecationWarning)
  
          def setattr_settings(settings_module, attr, value):
              setattr(settings_module, attr, value)
  
          self.assertRaises(DeprecationWarning, setattr_settings,
                            self.settings_module, 'MEDIA_URL', '/foo')
 
</s> remove         MEDIA_URL raises an DeprecationWarning error if it doesn't end in a
        slash.
 </s> add         MEDIA_URL and STATIC_URL raise an ImproperlyConfigured exception
        if they doesn't end in a slash. </s> remove         self.assertRaises(DeprecationWarning, setattr_settings,
 </s> add         self.assertRaises(ImproperlyConfigured, setattr_settings, </s> remove         self.assertRaises(DeprecationWarning, setattr_settings,
 </s> add         self.assertRaises(ImproperlyConfigured, setattr_settings, </s> remove             warnings.warn("If set, %s must end with a slash" % name,
                          DeprecationWarning)
 </s> add             raise ImproperlyConfigured("If set, %s must end with a slash" % name)
          """
          MEDIA_URL raises an DeprecationWarning error if it doesn't end in a
          slash.
          """



          def setattr_settings(settings_module, attr, value):
              setattr(settings_module, attr, value)
  
          self.assertRaises(DeprecationWarning, setattr_settings,
                            self.settings_module, 'MEDIA_URL', '/foo')
keep keep keep keep replace replace replace keep keep keep keep keep
 Required that the MEDIA_URL and STATIC_URL settings end with a slash, per the deprecation timeline.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@17845 bcc190cf-cafb-0310-a4f2-bffc1f526a37 
tests/regressiontests/settings_tests/tests.py