From: Assaf Muller Date: Fri, 2 May 2014 14:21:05 +0000 (+0300) Subject: Split up metering test case into plugin + test case X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=fd772afb697b70bf9da009976681a2a67d6fa5f1;p=openstack-build%2Fneutron-build.git Split up metering test case into plugin + test case Currently the metering test case includes setUp code as well as the tests themselves. Splitting up the test case class into two allows other test cases to inherit the metering plugin class without inherting (And implicitly re-running) the tests themselves. Closes-Bug: #1336198 Change-Id: I4427fcd17cc3d28189f9f74df487084cf35c1634 --- diff --git a/neutron/tests/unit/db/metering/test_db_metering.py b/neutron/tests/unit/db/metering/test_db_metering.py index 8a03509c3..fc61cbb2d 100644 --- a/neutron/tests/unit/db/metering/test_db_metering.py +++ b/neutron/tests/unit/db/metering/test_db_metering.py @@ -143,6 +143,8 @@ class MeteringPluginDbTestCase(test_db_plugin.NeutronDbPluginV2TestCase, app = config.load_paste_app('extensions_test_app') self.ext_api = ExtensionMiddleware(app, ext_mgr=ext_mgr) + +class TestMetering(MeteringPluginDbTestCase): def test_create_metering_label(self): name = 'my label' description = 'my metering label' @@ -288,5 +290,5 @@ class MeteringPluginDbTestCase(test_db_plugin.NeutronDbPluginV2TestCase, metering_label_rule) -class TestMeteringDbXML(MeteringPluginDbTestCase): +class TestMeteringDbXML(TestMetering): fmt = 'xml'