#NEWLINE# def test_load_user_role_assignments_duplicate_user_definition( self ) : #NEWLINE# #INDENT# loader = RBACDefinitionsLoader ( ) #NEWLINE# file_path1 = os . path . join ( get_fixtures_base_path ( ) , 'rbac_invalid/assignments/user_foo1.yaml' ) #NEWLINE# file_path2 = os . path . join ( get_fixtures_base_path ( ) , 'rbac_invalid/assignments/user_foo2.yaml' ) #NEWLINE# file_paths = [ file_path1 , file_path2 ] #NEWLINE# loader . _get_role_assiginments_file_paths = mock . Mock ( ) #NEWLINE# loader . _get_role_assiginments_file_paths . return_value = file_paths #NEWLINE# expected_msg = 'Duplicate definition file found for user "userfoo"' #NEWLINE# self . assertRaisesRegexp ( ValueError , file_path2 , loader . load_user_role_assignments )