#NEWLINE# @ override_settings ( ROOT_URLCONF = 'wagtail.tests.non_root_urls' ) #NEWLINE# def test_urls_with_non_root_urlconf( self ) : #NEWLINE# #INDENT# default_site = Site . objects . get ( is_default_site = True ) #NEWLINE# homepage = Page . objects . get ( url_path = '/home/' ) #NEWLINE# christmas_page = Page . objects . get ( url_path = '/home/events/christmas/' ) #NEWLINE# self . assertEqual ( homepage . get_url_parts ( ) , ( default_site . id , 'http://localhost' , '/site/' ) ) #NEWLINE# self . assertEqual ( homepage . full_url , 'http://localhost/site/' ) #NEWLINE# self . assertEqual ( homepage . url , '/site/' ) #NEWLINE# self . assertEqual ( homepage . relative_url ( default_site ) , '/site/' ) #NEWLINE# self . assertEqual ( homepage . get_site ( ) , default_site ) #NEWLINE# self . assertEqual ( christmas_page . get_url_parts ( ) , ( default_site . id , 'http://localhost' , '/site/events/christmas/' ) ) #NEWLINE# self . assertEqual ( christmas_page . full_url , 'http://localhost/site/events/christmas/' ) #NEWLINE# self . assertEqual ( christmas_page . url , '/site/events/christmas/' ) #NEWLINE# self . assertEqual ( christmas_page . relative_url ( default_site ) , '/site/events/christmas/' ) #NEWLINE# self . assertEqual ( christmas_page . get_site ( ) , default_site )