Added goal+strategy ObjectField for AuditTemplate
In this changeset, I added the "goal" and the "strategy "ObjectField which can either be loaded by setting the new "eager" parameter as True or not loaded (as before) by setting it to False. The advantage of introducing this eager parameter is that this way, we can reduce to a minimum the overhead of DB queries whenever the related goal is not actually needed. Change-Id: I97418163f68aea2f1cda80be94e4035f0b3700ae Partially-Implements: blueprint watcher-versioned-objects
This commit is contained in:
@@ -27,6 +27,7 @@ from watcher.tests.objects import utils as obj_utils
|
||||
class TestAuditEndpoint(base.DbTestCase):
|
||||
def setUp(self):
|
||||
super(TestAuditEndpoint, self).setUp()
|
||||
self.goal = obj_utils.create_test_goal(self.context)
|
||||
self.audit_template = obj_utils.create_test_audit_template(
|
||||
self.context)
|
||||
self.audit = obj_utils.create_test_audit(
|
||||
|
||||
Reference in New Issue
Block a user