#NEWLINE# def test_action_names__with_endpoints( self ) : #NEWLINE# #INDENT# class BasicViewSet ( viewsets . ViewSet ) : #NEWLINE# #INDENT# @ action ( is_for_list = True , endpoint = 'action_one' ) #NEWLINE# def action1( self , request , * args , **kwargs ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# @ action ( endpoint = 'action-two' ) #NEWLINE# def action2( self , request , * args , **kwargs ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# #UNINDENT# routes = self . router . get_routes ( BasicViewSet ) #NEWLINE# action1_list_route = self . get_dynamic_route_by_def_name ( 'action1' , action1_list_route ) #NEWLINE# action2_detail_route = self . get_dynamic_route_by_def_name ( 'action2' , routes ) #NEWLINE# self . assertEqual ( action1_list_route . name , '{basename}-action-one-list' ) #NEWLINE# self . assertEqual ( action2_detail_route . name , '{basename}-action-two' )