]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
VPNaaS Cisco unit test clean-up
authorPaul Michali <pcm@cisco.com>
Tue, 14 Oct 2014 22:18:15 +0000 (18:18 -0400)
committerPaul Michali <pcm@cisco.com>
Tue, 14 Oct 2014 22:18:15 +0000 (18:18 -0400)
Removed unused args to mock side-effect function and duplicate
constant.

Change-Id: I5409ce86ccaab86213d65f757f19c1bdf9a66929
Closes-Bug: #1381221

neutron/tests/unit/services/vpn/device_drivers/test_cisco_ipsec.py
neutron/tests/unit/services/vpn/service_drivers/test_cisco_ipsec.py

index fe373055c616eda432fe5c91f695b4d544777bb7..c6a6c68463783ea5a85b7028e3ba6bfe0ce308c4 100644 (file)
@@ -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.
index 781344f75f059c84dab4d0a72a73c60bdec4c957..10b9d987c803b6a8df455fee8239801cb674f043 100644 (file)
@@ -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