yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #34726
[Bug 1426265] Re: dhcp _test_sync_state_helper does not assert calls properly
** Changed in: neutron
Status: Fix Committed => Fix Released
** Changed in: neutron
Milestone: None => liberty-1
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1426265
Title:
dhcp _test_sync_state_helper does not assert calls properly
Status in OpenStack Neutron (virtual network service):
Fix Released
Bug description:
There are a few problems with _test_sync_state_helper
1. calling assert_has_called() on a mock object does nothing - should be assert_has_calls()
2. sync_state() no longer calls refresh_dhcp_helper()
3. safe_configure_dhcp_for_network() is not mocked out
4. it does a set diff between sets of different types
export NOSE_NOLOGCAPTURE=1
export OS_DEBUG=1
$ nosetests -v neutron.tests.unit.test_dhcp_agent:TestDhcpAgent.test_sync_state_disabled_net
...
2015-02-27 08:35:49,105 INFO [neutron.agent.dhcp.agent] Synchronizing state
2015-02-27 08:35:49,106 ERROR [neutron.agent.dhcp.agent] Unable to sync network state.
Traceback (most recent call last):
File "/opt/stack/neutron/neutron/agent/dhcp/agent.py", line 150, in sync_state
active_network_ids = set(network.id for network in active_networks)
File "/opt/stack/neutron/neutron/agent/dhcp/agent.py", line 150, in <genexpr>
active_network_ids = set(network.id for network in active_networks)
AttributeError: 'str' object has no attribute 'id'
2015-02-27 08:35:49,107 DEBUG [oslo_concurrency.lockutils] Lock "dhcp-agent" released by "sync_state" :: held 0.002s
passed
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1426265/+subscriptions
References