Browse Source

Merge "[Functional] Fix mocks of the create_dhcp_port method" into stable/victoria

changes/91/787191/1
Zuul 2 weeks ago
committed by Gerrit Code Review
parent
commit
e36f722305
1 changed files with 5 additions and 10 deletions
  1. +5
    -10
      neutron/tests/functional/agent/test_dhcp_agent.py

+ 5
- 10
neutron/tests/functional/agent/test_dhcp_agent.py View File

@ -356,17 +356,12 @@ class DHCPAgentOVSTestCase(DHCPAgentOVSTestFramework):
new_network.subnets.append(dhcp_enabled_ipv4_subnet)
self.mock_plugin_api.get_network_info.return_value = new_network
fixed_ip_mock = mock.Mock(
ip_address='192.168.10.2',
subnet_id=dhcp_enabled_ipv4_subnet.id)
dhcp_port_mock = mock.Mock(
dns_assignment={},
extra_dhcp_opts=[],
fixed_ips=[fixed_ip_mock],
id=new_network.ports[0].id,
dhcp_port_mock = self.create_port_dict(
network.id, dhcp_enabled_ipv4_subnet.id,
mac_address=str(self._DHCP_PORT_MAC_ADDRESS))
self.mock_plugin_api.get_dhcp_port.return_value = dhcp_port_mock
self.mock_plugin_api.update_dhcp_port.return_value = dhcp_port_mock
self.mock_plugin_api.create_dhcp_port.return_value = dhcp_port_mock
network.ports = []
new_network.ports = []
self.agent.refresh_dhcp_helper(network.id)
# Metadata proxy should be spawned for the newly added subnet


Loading…
Cancel
Save