#NEWLINE# def test_absolute_url( self ) : #NEWLINE# #INDENT# user = self . get_superuser ( ) #NEWLINE# page = create_page ( 'page' , 'nav_playground.html' , 'en' , published = True ) #NEWLINE# create_title ( 'fr' , 'french home' , page ) #NEWLINE# page_2 = create_page ( 'inner' , 'nav_playground.html' , 'en' , published = True , parent = page ) #NEWLINE# create_title ( 'fr' , 'french inner' , user ) #NEWLINE# publish_page ( page_2 , user , 'fr' ) #NEWLINE# self . assertEqual ( page_2 . get_absolute_url ( ) , '/en/inner/' ) #NEWLINE# self . assertEqual ( page_2 . get_absolute_url ( language = 'en' ) , '/en/inner/' ) #NEWLINE# self . assertEqual ( page_2 . get_absolute_url ( language = 'fr' ) , '/fr/french-inner/' ) #NEWLINE# with force_language ( 'fr' ) : #NEWLINE# #INDENT# self . assertEqual ( page_2 . get_absolute_url ( ) , '/fr/french-inner/' ) #NEWLINE# self . assertEqual ( page_2 . get_absolute_url ( language = 'en' ) , '/en/inner/' ) #NEWLINE# self . assertEqual ( page_2 . get_absolute_url ( language = 'fr' ) , '/fr/french-inner/' )