#NEWLINE# def test_get_resource_host_port( self ) : #NEWLINE# #INDENT# with patch ( 'yarn_api_client.hadoop_conf.parse' ) as parse_mock : #NEWLINE# #INDENT# parse_mock . return_value = 'example.com:8022' #NEWLINE# host_port = hadoop_conf . get_resource_manager_host_port ( ) #NEWLINE# self . assertEqual ( ( 'example.com' , '8022' ) , host_port ) #NEWLINE# parse_mock . assert_called_with ( '/etc/hadoop/conf/yarn-site.xml' , 'yarn.resourcemanager.webapp.address' ) #NEWLINE# parse_mock . reset_mock ( ) #NEWLINE# parse_mock . return_value = None #NEWLINE# host_port = hadoop_conf . get_resource_manager_host_port ( ) #NEWLINE# self . assertIsNone ( host_port )