]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Mock link local allocator write so UT doesn't write a file
authorCarl Baldwin <carl.baldwin@hp.com>
Thu, 19 Feb 2015 16:35:01 +0000 (16:35 +0000)
committerCarl Baldwin <carl.baldwin@hp.com>
Thu, 19 Feb 2015 16:46:28 +0000 (16:46 +0000)
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

neutron/tests/unit/test_l3_agent.py

index 5cd7f31db888b105bbabd4d4e4bdf5ee4f1c3b21..bd66690cc01054b36c4dcffd1121d8e7b19b3e0a 100644 (file)
@@ -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(),