#NEWLINE# def test_load_role_definitions_empty_definition_file( self ) : #NEWLINE# #INDENT# loader = RBACDefinitionsLoader ( ) #NEWLINE# file_path = os . path . join ( get_fixtures_base_path ( ) , 'rbac_invalid/roles/role_empty.yaml' ) #NEWLINE# file_paths = [ file_path ] #NEWLINE# loader . _get_role_definitions_file_paths = mock . Mock ( ) #NEWLINE# loader . _get_role_definitions_file_paths . return_value = file_paths #NEWLINE# expected_msg = 'Role definition file .+? is empty and invalid' #NEWLINE# self . assertRaisesRegexp ( ValueError , expected_msg , loader . load_role_definitions )