2
0
mirror of https://github.com/openkmip/pykmip synced 2025-12-21 10:43:15 +00:00

Add integration tests for Locate using new attributes

This change adds integration tests that verify that objects can
be found by Locate when filtering off of the new ObjectGroup and
ApplicationSpecificInformation attributes. Some minor tweaks to
the database attribute models are included to simplify usage.
This commit is contained in:
Peter Hamilton
2019-10-11 15:12:38 -04:00
committed by Peter Hamilton
parent 009e8cecc9
commit cd1079afd5
5 changed files with 86 additions and 32 deletions

View File

@@ -1831,10 +1831,12 @@ class ApplicationSpecificInformation(sql.Base):
raise TypeError("The application data must be a string.")
def __repr__(self):
application_namespace = "application_namespace={}".format(
application_namespace = "application_namespace='{}'".format(
self.application_namespace
)
application_data = "application_data={}".format(self.application_data)
application_data = "application_data='{}'".format(
self.application_data
)
return "ApplicationSpecificInformation({})".format(
", ".join(
@@ -1877,8 +1879,7 @@ class ObjectGroup(sql.Base):
_object_group = sqlalchemy.Column(
"object_group",
sqlalchemy.String,
nullable=False,
unique=True
nullable=False
)
managed_objects = sqlalchemy.orm.relationship(
"ManagedObject",
@@ -1909,7 +1910,7 @@ class ObjectGroup(sql.Base):
raise TypeError("The object group must be a string.")
def __repr__(self):
object_group = "object_group={}".format(self.object_group)
object_group = "object_group='{}'".format(self.object_group)
return "ObjectGroup({})".format(object_group)