update tests lint
This commit is contained in:
parent
7846ec6836
commit
aa232fe292
|
@ -1,6 +1,6 @@
|
||||||
"""User."""
|
"""User."""
|
||||||
|
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
from flask_bpmn.models.db import db
|
from flask_bpmn.models.db import db
|
||||||
|
|
||||||
from spiff_workflow_webapp.models.process_group import ProcessGroupModel
|
from spiff_workflow_webapp.models.process_group import ProcessGroupModel
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
"""Test Permissions."""
|
"""Test Permissions."""
|
||||||
|
|
||||||
from flask.app import Flask
|
from flask.app import Flask
|
||||||
from flask_bpmn.models.db import db
|
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_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:
|
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()
|
db.session.commit()
|
||||||
|
|
||||||
permission_assignment = PermissionAssignmentModel(
|
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.add(permission_assignment)
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
|
|
Loading…
Reference in New Issue