Merge "Add a test class to validate UTs fixes of new_facade flag"

This commit is contained in:
Zuul 2018-03-19 16:34:34 +00:00 committed by Gerrit Code Review
commit f2dced777a

View File

@ -90,6 +90,30 @@ class FakeSmallNeutronObject(base.NeutronDbObject):
}
@base.NeutronObjectRegistry.register_if(False)
class FakeSmallNeutronObjectNewEngineFacade(base.NeutronDbObject):
# Version 1.0: Initial version
VERSION = '1.0'
db_model = ObjectFieldsModel
new_facade = True
primary_keys = ['field1']
foreign_keys = {
'FakeNeutronObjectCompositePrimaryKeyWithId': {'field1': 'id'},
'FakeNeutronDbObject': {'field2': 'id'},
'FakeNeutronObjectUniqueKey': {'field3': 'id'},
}
fields = {
'field1': common_types.UUIDField(),
'field2': common_types.UUIDField(),
'field3': common_types.UUIDField(),
}
@base.NeutronObjectRegistry.register_if(False)
class FakeSmallNeutronObjectWithMultipleParents(base.NeutronDbObject):
# Version 1.0: Initial version
@ -1255,6 +1279,11 @@ class BaseDbObjectNonStandardPrimaryKeyTestCase(BaseObjectIfaceTestCase):
_test_class = FakeNeutronObjectNonStandardPrimaryKey
class BaseDbObjectNewEngineFacade(BaseObjectIfaceTestCase):
_test_class = FakeSmallNeutronObjectNewEngineFacade
class BaseDbObjectCompositePrimaryKeyTestCase(BaseObjectIfaceTestCase):
_test_class = FakeNeutronObjectCompositePrimaryKey