#NEWLINE# def test_page_urls( self ) : #NEWLINE# #INDENT# page1 = create_page ( 'test page 1' , 'nav_playground.html' , 'en' , published = True ) #NEWLINE# page2 = create_page ( 'test page 2' , 'nav_playground.html' , 'en' , published = True , parent = page1 ) #NEWLINE# page3 = create_page ( 'test page 3' , 'nav_playground.html' , 'en' , published = True , parent = page2 ) #NEWLINE# page4 = create_page ( 'test page 4' , 'nav_playground.html' , 'en' , published = True ) #NEWLINE# page5 = create_page ( 'test page 5' , 'nav_playground.html' , 'en' , published = True , parent = page4 ) #NEWLINE# page1 = page1 . reload ( ) #NEWLINE# page2 = page2 . reload ( ) #NEWLINE# page3 = page3 . reload ( ) #NEWLINE# page4 = page4 . reload ( ) #NEWLINE# page5 = page5 . reload ( ) #NEWLINE# self . assertEqual ( page3 . parent_id , page2 . pk ) #NEWLINE# self . assertEqual ( page2 . parent_id , page1 . pk ) #NEWLINE# self . assertEqual ( page5 . parent_id , page4 . pk ) #NEWLINE# self . assertEqual ( page1 . get_absolute_url ( ) , ( self . get_pages_root ( ) + '' ) ) #NEWLINE# self . assertEqual ( page2 . get_absolute_url ( ) , ( self . get_pages_root ( ) + 'test-page-2/' ) ) #NEWLINE# self . assertEqual ( page3 . get_absolute_url ( ) , ( self . get_pages_root ( ) + 'test-page-2/test-page-3/' ) ) #NEWLINE# self . assertEqual ( page4 . get_absolute_url ( ) , ( self . get_pages_root ( ) + 'test-page-4/' ) ) #NEWLINE# self . assertEqual ( page5 . get_absolute_url ( ) , ( self . get_pages_root ( ) + 'test-page-4/test-page-5/' ) ) #NEWLINE# page3 = self . move_page ( page3 , page1 ) #NEWLINE# self . assertEqual ( page3 . get_absolute_url ( ) , ( self . get_pages_root ( ) + 'test-page-3/' ) ) #NEWLINE# page3 = page3 . reload ( ) #NEWLINE# self . assertEqual ( len ( page3 . path ) , len ( page3 . publisher_public . path ) ) #NEWLINE# page2 = page2 . reload ( ) #NEWLINE# page5 = page5 . reload ( ) #NEWLINE# page5 = self . move_page ( page5 , page2 ) #NEWLINE# self . assertEqual ( page5 . get_absolute_url ( ) , ( self . get_pages_root ( ) + 'test-page-2/test-page-5/' ) ) #NEWLINE# page3 = page3 . reload ( ) #NEWLINE# page4 = page4 . reload ( ) #NEWLINE# page3 = self . move_page ( page3 , page4 ) #NEWLINE# self . assertEqual ( page3 . get_absolute_url ( ) , ( self . get_pages_root ( ) + 'test-page-4/test-page-3/' ) )