]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
pass static to argv to quantum-debug config parser
authorMark McClain <mark.mcclain@dreamhost.com>
Wed, 21 Nov 2012 18:16:37 +0000 (13:16 -0500)
committerMark McClain <mark.mcclain@dreamhost.com>
Wed, 21 Nov 2012 18:26:41 +0000 (13:26 -0500)
fixes bug 1079609

The quantum-debug tests were using the test runners sys.argv instead of
creating a known value.  This fix passes a fake argv to parse.

Change-Id: Iaae7292057b839f64e172504a55034a0d9272918

quantum/tests/unit/test_debug_commands.py

index 8f47d9195cf97aa21c1b6a6f3f6666a8ec179633..1a8fe9295e1f76bf031ba7d2b369a005151d46f0 100644 (file)
@@ -40,7 +40,7 @@ class TestDebugCommands(unittest.TestCase):
     def setUp(self):
         cfg.CONF.register_opts(interface.OPTS)
         cfg.CONF.register_opts(QuantumDebugAgent.OPTS)
-        cfg.CONF(args=sys.argv, project='quantum')
+        cfg.CONF(args=['quantum-debug'], project='quantum')
         cfg.CONF.set_override('use_namespaces', True)
         cfg.CONF.root_helper = 'sudo'