]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Allow unit tests to be run independently
authorHenry Gessau <gessau@cisco.com>
Tue, 31 Mar 2015 14:54:51 +0000 (10:54 -0400)
committerHenry Gessau <gessau@cisco.com>
Wed, 13 May 2015 15:16:59 +0000 (15:16 +0000)
commitc262695a31d698b75ee7e49328c324a045c365f5
treefde5341dd926e43cdbb50babaa0f37640e520186
parent4d7f4275f35299e94742c8d259b7e1d7a27a00d3
Allow unit tests to be run independently

Add various initializations and imports so that unit tests can be run
independently.

This change fixes the following test cases which could not be run
independently, that is running any individual unit test case by going
in to the py27 venv and running
"unit2 neutron.tests.unit.module.Class.test_case":

 neutron.tests.unit.plugins.ml2.drivers.arista.test_mechanism_arista.*
 neutron.tests.unit.plugins.ml2.drivers.cisco.apic.*
 neutron.tests.unit.plugins.ml2.test_rpc.RpcCallbacksTestCase.*
 neutron.tests.unit.services.l3_router.test_l3_apic.*
 neutron.tests.unit.agent.dhcp.test_agent.TestDhcpAgentEventHandler.*

(Note that these issues are not seen when running tox because the
initializations occur when all test modules are imported for test
discovery.)

Closes-bug: 1438463
Closes-bug: 1454640

Change-Id: I681caa66b51ce9a7bfbee5dfc43d534ba0d51947
neutron/tests/unit/agent/dhcp/test_agent.py
neutron/tests/unit/plugins/ml2/drivers/arista/test_mechanism_arista.py
neutron/tests/unit/plugins/ml2/drivers/cisco/apic/base.py
neutron/tests/unit/plugins/ml2/test_rpc.py