-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 待审批的查询和上线工单, 都显示审批人用户名 * black * 补充工单详情的单元测试 * 补充工单详情的单元测试
- Loading branch information
Showing
7 changed files
with
50 additions
and
18 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
from pytest_django.asserts import assertTemplateUsed, assertContains | ||
|
||
from sql.utils.workflow_audit import AuditV2 | ||
|
||
|
||
def test_get_sql_workflow( | ||
sql_workflow, | ||
fake_generate_audit_setting, | ||
super_user, | ||
admin_client, | ||
create_auth_group, | ||
): | ||
sql_workflow, _ = sql_workflow | ||
audit = AuditV2(workflow=sql_workflow) | ||
audit.create_audit() | ||
audit.workflow.status = "workflow_manreviewing" | ||
audit.workflow.save() | ||
response = admin_client.get(f"/detail/{sql_workflow.id}/") | ||
assert response.status_code == 200 | ||
assertTemplateUsed(response, "detail.html") | ||
# 展示审批人用户名 | ||
assert ( | ||
response.context["current_audit_auth_group"] | ||
== f"{create_auth_group.name}: {super_user.username}" | ||
) |
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