From a3d76b5e85b1c9efbd497ceef2dfb18b0e3e5f6a Mon Sep 17 00:00:00 2001 From: mike cullerton Date: Fri, 10 Jun 2022 12:51:38 -0400 Subject: [PATCH] pre commit with poetry --- src/spiffworkflow_backend/scripts/script.py | 2 ++ .../integration/test_process_api.py | 22 ++++++++++--------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/spiffworkflow_backend/scripts/script.py b/src/spiffworkflow_backend/scripts/script.py index a47395db..113516bc 100644 --- a/src/spiffworkflow_backend/scripts/script.py +++ b/src/spiffworkflow_backend/scripts/script.py @@ -49,6 +49,7 @@ class Script: We may be able to remove the task for each of these calls if we are not using it other than potentially updating the task data. """ + def make_closure(subclass, task, workflow_id): """Yes - this is black magic. @@ -84,6 +85,7 @@ class Script: We may be able to remove the task for each of these calls if we are not using it other than potentially updating the task data. """ + def make_closure_validate(subclass, task, workflow_id): """Make_closure_validate.""" instance = subclass() diff --git a/tests/spiffworkflow_backend/integration/test_process_api.py b/tests/spiffworkflow_backend/integration/test_process_api.py index 8b3710fc..34f4feb8 100644 --- a/tests/spiffworkflow_backend/integration/test_process_api.py +++ b/tests/spiffworkflow_backend/integration/test_process_api.py @@ -54,7 +54,7 @@ def test_process_model_delete(app, client: FlaskClient, with_bpmn_file_cleanup): headers=logged_in_headers(user), ) assert response.status_code == 200 - assert response.json['ok'] is True + assert response.json["ok"] is True # assert we no longer have a model process_model = ProcessModelService().get_spec("make_cookies") @@ -131,8 +131,8 @@ def test_process_group_delete(app, client: FlaskClient, with_bpmn_file_cleanup): def test_process_group_update(app, client: FlaskClient, with_bpmn_file_cleanup): """Test Process Group Update.""" - group_id = 'test_process_group' - group_display_name = 'Test Group' + group_id = "test_process_group" + group_display_name = "Test Group" user = find_or_create_user() create_process_group(client, user, group_id, display_name=group_display_name) @@ -140,18 +140,20 @@ def test_process_group_update(app, client: FlaskClient, with_bpmn_file_cleanup): assert process_group.display_name == group_display_name - process_group.display_name = 'Modified Display Name' + process_group.display_name = "Modified Display Name" - response = client.put(f"/v1.0/process-groups/{group_id}", - headers=logged_in_headers(user), - content_type="application/json", - data=json.dumps(ProcessGroupSchema().dump(process_group))) + response = client.put( + f"/v1.0/process-groups/{group_id}", + headers=logged_in_headers(user), + content_type="application/json", + data=json.dumps(ProcessGroupSchema().dump(process_group)), + ) assert response.status_code == 200 process_group = ProcessModelService().get_process_group(group_id) - assert process_group.display_name == 'Modified Display Name' + assert process_group.display_name == "Modified Display Name" - print('test_process_group_update') + print("test_process_group_update") def test_process_model_file_save(app, client: FlaskClient, with_bpmn_file_cleanup):