From 2646af8269e5971189532794fb66d9a602f1a6d4 Mon Sep 17 00:00:00 2001 From: Sean McCully Date: Sat, 14 Sep 2013 15:14:33 -0500 Subject: [PATCH] Fixes hyperv neutron agent test, and removes exit Fixes test for hyperv neutron agent, and removes sys.exit from hyperv neutron agent Fixes: bug #1225509 Change-Id: Icf67c6775b6a25a5223ffa7e2d863c2bc0486c2c --- neutron/plugins/hyperv/agent/hyperv_neutron_agent.py | 2 -- neutron/tests/unit/hyperv/test_hyperv_neutron_agent.py | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/neutron/plugins/hyperv/agent/hyperv_neutron_agent.py b/neutron/plugins/hyperv/agent/hyperv_neutron_agent.py index 76dc2db515..40c347a8ac 100644 --- a/neutron/plugins/hyperv/agent/hyperv_neutron_agent.py +++ b/neutron/plugins/hyperv/agent/hyperv_neutron_agent.py @@ -21,7 +21,6 @@ import eventlet import platform import re -import sys import time from oslo.config import cfg @@ -356,4 +355,3 @@ def main(): # Start everything. LOG.info(_("Agent initialized successfully, now running... ")) plugin.daemon_loop() - sys.exit(0) diff --git a/neutron/tests/unit/hyperv/test_hyperv_neutron_agent.py b/neutron/tests/unit/hyperv/test_hyperv_neutron_agent.py index faf1fc6fcf..f9e17d41bb 100644 --- a/neutron/tests/unit/hyperv/test_hyperv_neutron_agent.py +++ b/neutron/tests/unit/hyperv/test_hyperv_neutron_agent.py @@ -115,7 +115,7 @@ class TestHyperVNeutronAgent(base.BaseTestCase): def test_main(self): with mock.patch.object(hyperv_neutron_agent, 'HyperVNeutronAgent') as plugin: - with mock.patch.object(hyperv_neutron_agent, 'cfg') as cfg: + with mock.patch.object(hyperv_neutron_agent.cfg, 'CONF') as cfg: with mock.patch('eventlet.monkey_patch') as eventlet: with mock.patch.object( hyperv_neutron_agent,