#NEWLINE# def test_trigger_refresh( self ) : #NEWLINE# #INDENT# 'Trigger update of menu item HREFs.' #NEWLINE# team = Team . objects . create ( slug = 'durham-bulls' ) #NEWLINE# ct = ContentType . objects . get ( app_label = 'treenav' , model = 'team' ) #NEWLINE# menu = self . create_menu_item ( label = 'Durham Bulls' , slug = 'durham-bulls' , order = 9 , content_type = ct , object_id = team . pk , href = team . get_absolute_url ( ) ) #NEWLINE# team . slug = 'wildcats' #NEWLINE# team . save ( ) #NEWLINE# self . assertNotEqual ( menu . href , team . get_absolute_url ( ) ) #NEWLINE# response = self . client . get ( self . refresh_url , follow = True ) #NEWLINE# self . assertRedirects ( response , self . changelist_url ) #NEWLINE# menu = MenuItem . objects . get ( pk = menu . pk ) #NEWLINE# self . assertEqual ( menu . href , team . get_absolute_url ( ) ) #NEWLINE# self . assertEqual ( len ( response . context [ 'messages' ] ) , 1 )