#NEWLINE# def test_parent_device_yield( self , mock_ibd ) : #NEWLINE# #INDENT# address = '127.0.0.1' #NEWLINE# port = 3306 #NEWLINE# iqn = 'iqn.xyz' #NEWLINE# lun = 1 #NEWLINE# expected_dev = '/dev/fake' #NEWLINE# mock_ibd . return_value = True #NEWLINE# with utils . _iscsi_setup_and_handle_errors ( expected_dev , port , iqn , lun ) as dev : #NEWLINE# #INDENT# self . assertEqual ( expected_dev , dev ) #NEWLINE# #UNINDENT# mock_ibd . assert_called_once_with ( expected_dev )