From: Carl Baldwin Date: Thu, 19 Feb 2015 16:35:01 +0000 (+0000) Subject: Mock link local allocator write so UT doesn't write a file X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=7e6a664eaee2aaf3112208076091c14895d3c4e2;p=openstack-build%2Fneutron-build.git Mock link local allocator write so UT doesn't write a file The UTs recently started writing a fip-linklocal-networks file in test_l3_agent. This is due to a recently added test. This patch adds a mock to it so that the file is not written. Change-Id: I338a369fe25e64faa84cdec413d6bad7b315f890 --- diff --git a/neutron/tests/unit/test_l3_agent.py b/neutron/tests/unit/test_l3_agent.py index 5cd7f31db..bd66690cc 100644 --- a/neutron/tests/unit/test_l3_agent.py +++ b/neutron/tests/unit/test_l3_agent.py @@ -906,7 +906,8 @@ class TestBasicRouterOperations(BasicRouterOperationsFramework): agent_gateway_port[0], agent.get_floating_agent_gw_interface(ri, fake_network_id)) - def test_create_dvr_fip_interfaces(self): + @mock.patch.object(lla.LinkLocalAllocator, '_write') + def test_create_dvr_fip_interfaces(self, lla_write): fake_network_id = _uuid() fake_floatingips = {'floatingips': [ {'id': _uuid(),