-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1. 增加sops接口睡眠超时限制 2. 自动处理任务捕获等待超时异常 3. 增加运行日志 4. 修复单测运行环境异常
- Loading branch information
Showing
6 changed files
with
24 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
# -*- coding: utf-8 -*- | ||
from core.render import Jinja2Renderer | ||
from services.web.risk.render import RiskTitleUndefined | ||
from tests.base import TestCase | ||
|
||
|
||
def test_jinja_render(): | ||
template_value = "render: {{content.title}} {{content.content}} {{title}} {{test}}" | ||
context = {"content": {"title": "title", "content": "content"}, "title": "title"} | ||
actual = Jinja2Renderer(undefined=RiskTitleUndefined).jinja_render(template_value, context) | ||
assert actual == "render: title content title (未获取到变量值:test)" | ||
class TestJinja2Render(TestCase): | ||
def test_jinja_render(self): | ||
template_value = "render: {{content.title}} {{content.content}} {{title}} {{test}}" | ||
context = {"content": {"title": "title", "content": "content"}, "title": "title"} | ||
actual = Jinja2Renderer(undefined=RiskTitleUndefined).jinja_render(template_value, context) | ||
assert actual == "render: title content title (未获取到变量值:test)" |