Merge "Test service with Component instead of Plan db object"

This commit is contained in:
Jenkins
2014-04-15 20:49:20 +00:00
committed by Gerrit Code Review

View File

@@ -21,7 +21,7 @@ import testtools
from solum.common import service from solum.common import service
from solum import objects from solum import objects
from solum.objects import plan as abstract from solum.objects import component as abstract
from solum.tests import base from solum.tests import base
@@ -30,6 +30,7 @@ class TestService(base.BaseTestCase):
def test_prepare_invokes_object_load(self): def test_prepare_invokes_object_load(self):
objects.registry.clear() objects.registry.clear()
with testtools.ExpectedException(KeyError): with testtools.ExpectedException(KeyError):
objects.registry.Plan() objects.registry.Component()
service.prepare_service([]) service.prepare_service([])
self.assertTrue(issubclass(objects.registry.Plan, abstract.Plan)) self.assertTrue(issubclass(objects.registry.Component,
abstract.Component))