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
This commit is contained in:
Assaf Muller 2014-05-02 17:21:05 +03:00
parent 5562c7dcd4
commit 137a220a45

View 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'