'MEDIA_URL raises an PendingDeprecationWarning error if it doesn\'t end in a
slash.'

def test_no_end_slash(self):

    import warnings
    warnings.filterwarnings('error', 'If    set,    MEDIA_URL    must    end    with    a    slash', PendingDeprecationWarning)
    def setattr_settings(settings_module, attr, value):
        setattr(settings_module, attr, value)
    self.assertRaises(PendingDeprecationWarning, setattr_settings, self.settings_module, 'MEDIA_URL', '/foo')
    self.assertRaises(PendingDeprecationWarning, setattr_settings, self.settings_module, 'MEDIA_URL', 'http://media.foo.com')
