Merge "Test the secret model using an in memory database"

This commit is contained in:
Jenkins
2014-09-25 14:26:52 +00:00
committed by Gerrit Code Review
3 changed files with 214 additions and 2 deletions

View File

@@ -327,7 +327,7 @@ class BaseRepo(object):
return entity
def create_from(self, entity):
def create_from(self, entity, session=None):
"""Sub-class hook: create from entity."""
start = time.time() # DEBUG
if not entity:
@@ -340,7 +340,7 @@ class BaseRepo(object):
raise exception.Invalid(msg)
LOG.debug("Begin create from...")
session = get_session()
session = get_session(session)
with session.begin():
# Validate the attributes before we go any further. From my