#NEWLINE# def test_manual_updates_bad_upload( self ) : #NEWLINE# #INDENT# 'Testing check_updates_required with a bad upload directory' #NEWLINE# siteconfig = SiteConfiguration . objects . get_current ( ) #NEWLINE# siteconfig . set ( 'site_media_root' , '/' ) #NEWLINE# siteconfig . save ( ) #NEWLINE# settings . MEDIA_ROOT = '/' #NEWLINE# checks . reset_check_cache ( ) #NEWLINE# updates_required = checks . check_updates_required ( ) #NEWLINE# self . assertEqual ( len ( updates_required ) , 2 ) #NEWLINE# ( url , data ) = updates_required [ 0 ] #NEWLINE# self . assertEqual ( url , 'admin/manual-updates/media-upload-dir.html' ) #NEWLINE# response = self . client . get ( '/dashboard/' ) #NEWLINE# self . assertEqual ( response . status_code , 200 ) #NEWLINE# self . assertTemplateUsed ( response , 'admin/manual_updates_required.html' ) #NEWLINE# settings . MEDIA_ROOT = self . old_media_root #NEWLINE# siteconfig = SiteConfiguration . objects . get_current ( ) #NEWLINE# siteconfig . set ( 'site_media_root' , self . old_media_root ) #NEWLINE# siteconfig . save ( ) #NEWLINE# response = self . client . get ( '/dashboard/' ) #NEWLINE# self . assertTemplateNotUsed ( response , 'admin/manual_updates_required.html' )