From dc322a6e7de7404c05889b1539803103748dadf3 Mon Sep 17 00:00:00 2001 From: Slawek Kaplonski Date: Wed, 3 Feb 2021 21:08:19 +0100 Subject: [PATCH] Remove duplicated assignement of the device_owner in UT In the unit tests of the dhcp linux driver module there are some fake port classes defined. Some of them had duplicate assignement of the device_owner, once it was set to some constant value and later it was assignment with some value given as an __init__'s argument. This patch removes setting constant value. We can always accept value given as input argument. TrivialFix Change-Id: Iff47cf1646fc99fd5a1bf4ff5498d4a15f9d9d68 --- neutron/tests/unit/agent/linux/test_dhcp.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/neutron/tests/unit/agent/linux/test_dhcp.py b/neutron/tests/unit/agent/linux/test_dhcp.py index f88b05957c1..0089b6c523c 100644 --- a/neutron/tests/unit/agent/linux/test_dhcp.py +++ b/neutron/tests/unit/agent/linux/test_dhcp.py @@ -296,7 +296,6 @@ class FakeRouterPort(object): ip_address='192.168.0.1', domain='openstacklocal'): self.id = 'rrrrrrrr-rrrr-rrrr-rrrr-rrrrrrrrrrrr' self.admin_state_up = True - self.device_owner = constants.DEVICE_OWNER_ROUTER_INTF self.mac_address = '00:00:0f:rr:rr:rr' self.device_id = 'fake_router_port' self.dns_assignment = [] @@ -313,7 +312,6 @@ class FakeRouterPortNoDHCP(object): ip_address='192.168.0.1', domain='openstacklocal'): self.id = 'ssssssss-ssss-ssss-ssss-ssssssssssss' self.admin_state_up = True - self.device_owner = constants.DEVICE_OWNER_ROUTER_INTF self.mac_address = '00:00:0f:rr:rr:rr' self.device_id = 'fake_router_port_no_dhcp' self.dns_assignment = []