Fix TestDhcpAgentEventHandler test that fails in some Jenkins runs.
Add mocking of check_version method that have ran dnsmasq process to retrieve version fixes bug 1200698 Change-Id: I6476d62bc4394bdf9701a2aa26a435f8bcb00d0d
This commit is contained in:
parent
bd18990d78
commit
b12502e7e6
@ -442,7 +442,10 @@ class TestDhcpAgentEventHandler(base.BaseTestCase):
|
||||
self.cache = mock.Mock()
|
||||
cache_cls.return_value = self.cache
|
||||
|
||||
self.dhcp = dhcp_agent.DhcpAgent(HOSTNAME)
|
||||
with mock.patch.object(dhcp.Dnsmasq,
|
||||
'check_version') as check_v:
|
||||
check_v.return_value = dhcp.Dnsmasq.MINIMUM_VERSION
|
||||
self.dhcp = dhcp_agent.DhcpAgent(HOSTNAME)
|
||||
self.call_driver_p = mock.patch.object(self.dhcp, 'call_driver')
|
||||
|
||||
self.call_driver = self.call_driver_p.start()
|
||||
|
Loading…
x
Reference in New Issue
Block a user