#NEWLINE# def test_existing_overwrite_url( self ) : #NEWLINE# #INDENT# with self . settings ( CMS_PERMISSION = False ) : #NEWLINE# #INDENT# create_page ( 'home' , 'nav_playground.html' , 'en' , published = True ) #NEWLINE# create_page ( 'boo' , 'nav_playground.html' , 'en' , published = True ) #NEWLINE# data = { #NEWLINE# #INDENT# 'title' : 'foo' , #NEWLINE# 'overwrite_url' : '/boo/' , #NEWLINE# 'slug' : 'foo' , #NEWLINE# 'language' : 'en' , #NEWLINE# 'template' : 'nav_playground.html' , #NEWLINE# 'site' : 1 , #NEWLINE# #UNINDENT# } #NEWLINE# form = AdvancedSettingsForm ( data ) #NEWLINE# self . assertFalse ( form . is_valid ( ) ) #NEWLINE# self . assertTrue ( ( 'overwrite_url' in form . errors ) )