update tests lint

This commit is contained in:
burnettk 2022-05-23 19:14:52 -04:00
parent 7846ec6836
commit aa232fe292
2 changed files with 10 additions and 6 deletions

View File

@ -1,6 +1,6 @@
"""User."""
from typing import Any
from flask_bpmn.models.db import db
from spiff_workflow_webapp.models.process_group import ProcessGroupModel

View File

@ -1,12 +1,12 @@
"""Test Permissions."""
from flask.app import Flask
from flask_bpmn.models.db import db
from tests.spiff_workflow_webapp.helpers.test_data import find_or_create_process_group
from tests.spiff_workflow_webapp.helpers.test_data import find_or_create_user
from tests.spiff_workflow_webapp.helpers.test_data import find_or_create_user, find_or_create_process_group
from spiff_workflow_webapp.models.principal import PrincipalModel
from spiff_workflow_webapp.models.permission_target import PermissionTargetModel
from spiff_workflow_webapp.models.permission_assignment import PermissionAssignmentModel
from spiff_workflow_webapp.models.permission_target import PermissionTargetModel
from spiff_workflow_webapp.models.principal import PrincipalModel
def test_user_can_be_given_permission_to_administer_process_group(app: Flask) -> None:
@ -22,6 +22,10 @@ def test_user_can_be_given_permission_to_administer_process_group(app: Flask) ->
db.session.commit()
permission_assignment = PermissionAssignmentModel(
permission_target_id=permission_target.id, principal_id=principal.id, permission="administer", grant_type="grant")
permission_target_id=permission_target.id,
principal_id=principal.id,
permission="administer",
grant_type="grant",
)
db.session.add(permission_assignment)
db.session.commit()