'Test get ehternet ip.'

@mock.patch('six.moves.http_client.HTTPConnection')
def test_get_ethernet_ip(self, mock_http_connection):

    mock_http_connection.return_value.getresponse.side_effect = [FakeLoginResponse(), FakeGetBasicInfoTesResponse(), FakeLoginResponse(), FakeGetAllEthernetIp()]
    self.driver = qnap.QnapISCSIDriver(configuration=create_configuration('admin', 'qnapadmin', 'http://1.2.3.4:8080', '1.2.3.4', 'Pool1', True))
    self.driver.do_setup('context')
    self.driver.api_executor.get_ethernet_ip(type='data')
    get_ethernet_ip_url = '/cgi-bin/sys/sysRequest.cgi?subfunc=net_setting&sid=fakeSid'
    expected_call_list = [mock.call('POST', login_url, global_sanitized_params, header), mock.call('GET', get_basic_info_url), mock.call('POST', login_url, global_sanitized_params, header), mock.call('GET', get_ethernet_ip_url)]
    self.assertEqual(expected_call_list, mock_http_connection.return_value.request.call_args_list)
