Remove dependency on nova test modules

Replace all nova test module calls with stubs or mocks to avoid
issues caused by changes in the nova test framework or nova itself.

Change-Id: I07248b64cc5c30c90c5e68df09ae8dfc2875c279
Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
This commit is contained in:
Doug Hellmann
2012-08-20 17:30:20 -04:00
parent 74239d9a83
commit 7eaf0247c7
13 changed files with 215 additions and 72 deletions

View File

@@ -20,20 +20,18 @@
import datetime
from nova import context
from nova import test
from ceilometer import meter
from ceilometer.collector import manager
from ceilometer.storage import base
from ceilometer.tests import base as tests_base
class TestCollectorManager(test.TestCase):
class TestCollectorManager(tests_base.TestCase):
def setUp(self):
super(TestCollectorManager, self).setUp()
self.mgr = manager.CollectorManager()
self.ctx = context.RequestContext("user", "project")
self.ctx = None
def test_valid_message(self):
msg = {'counter_name': 'test',
@@ -88,4 +86,3 @@ class TestCollectorManager(test.TestCase):
self.mgr.record_metering_data(self.ctx, msg)
self.mox.VerifyAll()