]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Split up metering test case into plugin + test case
authorAssaf Muller <amuller@redhat.com>
Fri, 2 May 2014 14:21:05 +0000 (17:21 +0300)
committerAssaf Muller <amuller@redhat.com>
Sun, 13 Jul 2014 08:30:23 +0000 (11:30 +0300)
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

neutron/tests/unit/db/metering/test_db_metering.py

index 8a03509c30ea1d7a8feddb38f78d234d34165235..fc61cbb2d23bcff3e51616beb8311da32ded547d 100644 (file)
@@ -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'