From 042c8f354a1441301ee6b5dbd2ecf673e3f3fea4 Mon Sep 17 00:00:00 2001 From: Paul Michali Date: Tue, 14 Oct 2014 18:18:15 -0400 Subject: [PATCH] VPNaaS Cisco unit test clean-up Removed unused args to mock side-effect function and duplicate constant. Change-Id: I5409ce86ccaab86213d65f757f19c1bdf9a66929 Closes-Bug: #1381221 --- .../unit/services/vpn/device_drivers/test_cisco_ipsec.py | 2 +- .../unit/services/vpn/service_drivers/test_cisco_ipsec.py | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/neutron/tests/unit/services/vpn/device_drivers/test_cisco_ipsec.py b/neutron/tests/unit/services/vpn/device_drivers/test_cisco_ipsec.py index fe373055c..c6a6c6846 100644 --- a/neutron/tests/unit/services/vpn/device_drivers/test_cisco_ipsec.py +++ b/neutron/tests/unit/services/vpn/device_drivers/test_cisco_ipsec.py @@ -125,7 +125,7 @@ class TestCiscoCsrIPSecConnection(base.BaseTestCase): steps are called in reverse order. At the end, there should be no rollback infromation for the connection. """ - def fake_route_check_fails(*args, **kwargs): + def fake_route_check_fails(*args): if args[0] == 'Static Route': # So that subsequent calls to CSR rest client (for rollback) # will fake as passing. diff --git a/neutron/tests/unit/services/vpn/service_drivers/test_cisco_ipsec.py b/neutron/tests/unit/services/vpn/service_drivers/test_cisco_ipsec.py index 781344f75..10b9d987c 100644 --- a/neutron/tests/unit/services/vpn/service_drivers/test_cisco_ipsec.py +++ b/neutron/tests/unit/services/vpn/service_drivers/test_cisco_ipsec.py @@ -29,19 +29,15 @@ from neutron.tests.unit import testlib_api _uuid = uuidutils.generate_uuid FAKE_VPN_CONN_ID = _uuid() +FAKE_SERVICE_ID = _uuid() FAKE_VPN_CONNECTION = { - 'vpnservice_id': _uuid(), + 'vpnservice_id': FAKE_SERVICE_ID, 'id': FAKE_VPN_CONN_ID, 'ikepolicy_id': _uuid(), 'ipsecpolicy_id': _uuid(), 'tenant_id': _uuid() } -FAKE_SERVICE_ID = _uuid() -FAKE_VPN_CONNECTION = { - 'vpnservice_id': FAKE_SERVICE_ID -} - FAKE_ROUTER_ID = _uuid() FAKE_VPN_SERVICE = { 'router_id': FAKE_ROUTER_ID