#NEWLINE# def test_load_role_definitions_duplicate_role_definition( self ) : #NEWLINE# #INDENT# loader = RBACDefinitionsLoader ( ) #NEWLINE# file_path1 = os . path . join ( get_fixtures_base_path ( ) , 'rbac_invalid/roles/role_three1.yaml' ) #NEWLINE# file_path2 = os . path . join ( get_fixtures_base_path ( ) , 'rbac_invalid/roles/role_three2.yaml' ) #NEWLINE# file_paths = [ file_path1 , file_path2 ] #NEWLINE# loader . _get_role_definitions_file_paths = mock . Mock ( ) #NEWLINE# loader . _get_role_definitions_file_paths . return_value = file_paths #NEWLINE# expected_msg = 'Duplicate definition file found for role "role_three_name_conflict"' #NEWLINE# self . assertRaisesRegexp ( ValueError , expected_msg , loader . load_role_definitions )