Merge "test_servicetype: Service Type model to OVO"

This commit is contained in:
Zuul 2018-04-13 04:40:35 +00:00 committed by Gerrit Code Review
commit 0aaff41140

View File

@ -24,9 +24,9 @@ import webob.exc as webexc
import webtest import webtest
from neutron.api import extensions from neutron.api import extensions
from neutron.db.models import servicetype as st_model
from neutron.db import servicetype_db as st_db from neutron.db import servicetype_db as st_db
from neutron.extensions import servicetype from neutron.extensions import servicetype
from neutron.objects import servicetype as servicetype_obj
from neutron.services import provider_configuration as provconf from neutron.services import provider_configuration as provconf
from neutron.tests.unit.api import test_extensions from neutron.tests.unit.api import test_extensions
from neutron.tests.unit.api.v2 import test_base from neutron.tests.unit.api.v2 import test_base
@ -152,11 +152,9 @@ class ServiceTypeManagerTestCase(testlib_api.SqlTestCase):
constants.LOADBALANCER, constants.LOADBALANCER,
'lbaas1', 'lbaas1',
uuidutils.generate_uuid()) uuidutils.generate_uuid())
self.assertEqual(ctx.session. self.assertEqual(
query(st_model.ProviderResourceAssociation).count(), 1, servicetype_obj.ProviderResourceAssociation.count(ctx))
1) servicetype_obj.ProviderResourceAssociation.delete_objects(ctx)
assoc = ctx.session.query(st_model.ProviderResourceAssociation).one()
ctx.session.delete(assoc)
def test_invalid_resource_association(self): def test_invalid_resource_association(self):
self._set_override([constants.LOADBALANCER + self._set_override([constants.LOADBALANCER +