#NEWLINE# def test_cache_clears_when_site_deleted( self ) : #NEWLINE# #INDENT# '\n        This tests that the cache is cleared whenever a site is deleted\n        ' #NEWLINE# homepage = Page . objects . get ( url_path = '/home/' ) #NEWLINE# _ = self . url #NEWLINE# self . assertTrue ( cache . get ( 'wagtail_site_root_paths' ) ) #NEWLINE# Site . objects . get ( is_default_site = True ) . delete ( ) #NEWLINE# self . assertFalse ( cache . get ( 'wagtail_site_root_paths' ) )