#NEWLINE# def test_edit_page( self ) : #NEWLINE# #INDENT# '\n        Test that a page can edited via the admin\n        ' #NEWLINE# superuser = self . get_superuser ( ) #NEWLINE# with self . login_user_context ( superuser ) : #NEWLINE# #INDENT# page_data = self . get_new_page_data ( ) #NEWLINE# response = self . client . post ( URL_CMS_PAGE_ADD , page_data ) #NEWLINE# page = Page . objects . get ( title_set__slug = page_data [ 'slug' ] , publisher_is_draft = True ) #NEWLINE# response = self . client . get ( ( URL_CMS_PAGE_CHANGE % page . id ) ) #NEWLINE# self . assertEqual ( response . status_code , 200 ) #NEWLINE# page_data [ 'title' ] = 'changed title' #NEWLINE# response = self . client . post ( ( URL_CMS_PAGE_CHANGE % page . id ) , page_data ) #NEWLINE# self . assertRedirects ( response , URL_CMS_PAGE ) #NEWLINE# self . assertEqual ( page . get_title ( ) , 'changed title' )