Add tests to verify correctness of the switching provider task

This commit is contained in:
Imdad Ahad
2017-02-13 15:46:06 +00:00
parent d058626119
commit 73d5ce4f8b
5 changed files with 232 additions and 40 deletions

View File

@@ -13,8 +13,8 @@ from app.dao.dao_utils import (
@transactional
@version_class(Template, TemplateHistory)
def dao_create_template(template):
template.id = uuid.uuid4() # must be set now so version history model can use same id
def dao_create_template(template, template_id=None):
template.id = template_id or uuid.uuid4() # must be set now so version history model can use same id
template.archived = False
db.session.add(template)