diff --git a/.github/workflows/auto-merge-dependabot-prs.yml b/.github/workflows/auto-merge-dependabot-prs.yml index fafd9636..b5c60e1d 100644 --- a/.github/workflows/auto-merge-dependabot-prs.yml +++ b/.github/workflows/auto-merge-dependabot-prs.yml @@ -24,11 +24,11 @@ jobs: name: Print event runs-on: ubuntu-latest steps: - - name: Dump GitHub context - env: - GITHUB_CONTEXT: ${{ toJson(github) }} - run: | - echo "$GITHUB_CONTEXT" + - name: Dump GitHub context + env: + GITHUB_CONTEXT: ${{ toJson(github) }} + run: | + echo "$GITHUB_CONTEXT" dependabot: runs-on: ubuntu-latest @@ -40,7 +40,7 @@ jobs: ###### GET PR NUMBER # we saved the pr_number in tests.yml. fetch it so we can merge the correct PR. # https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_run - - name: 'Download artifact' + - name: "Download artifact" uses: actions/github-script@v6 with: script: | @@ -60,7 +60,7 @@ jobs: }); let fs = require('fs'); fs.writeFileSync(`${process.env.GITHUB_WORKSPACE}/pr_number.zip`, Buffer.from(download.data)); - - name: 'Unzip artifact' + - name: "Unzip artifact" run: unzip pr_number.zip ########### diff --git a/src/spiffworkflow_backend/routes/process_api_blueprint.py b/src/spiffworkflow_backend/routes/process_api_blueprint.py index 9e2f12be..29493d16 100644 --- a/src/spiffworkflow_backend/routes/process_api_blueprint.py +++ b/src/spiffworkflow_backend/routes/process_api_blueprint.py @@ -4,7 +4,6 @@ import json import connexion from flask import Blueprint from flask import g -from flask import request from flask import Response from flask_bpmn.api.api_error import ApiError @@ -237,7 +236,9 @@ def process_instance_list(process_model_id, page=1, per_page=100): } return Response(json.dumps(response_json), status=200, mimetype="application/json") + def get_file_from_request(): + """Get_file_from_request.""" request_file = connexion.request.files.get("file") if not request_file: raise ApiError( diff --git a/tests/spiffworkflow_backend/integration/test_process_api.py b/tests/spiffworkflow_backend/integration/test_process_api.py index 33af61f3..6475cf22 100644 --- a/tests/spiffworkflow_backend/integration/test_process_api.py +++ b/tests/spiffworkflow_backend/integration/test_process_api.py @@ -156,7 +156,9 @@ def test_process_group_update(app, client: FlaskClient, with_bpmn_file_cleanup): print("test_process_group_update") -def test_process_model_file_update_fails_if_no_file_given(app, client: FlaskClient, with_bpmn_file_cleanup): +def test_process_model_file_update_fails_if_no_file_given( + app, client: FlaskClient, with_bpmn_file_cleanup +): """Test_process_model_file_update.""" create_spec_file(app, client) @@ -175,7 +177,9 @@ def test_process_model_file_update_fails_if_no_file_given(app, client: FlaskClie assert response.json["code"] == "no_file_given" -def test_process_model_file_update_fails_if_contents_is_empty(app, client: FlaskClient, with_bpmn_file_cleanup): +def test_process_model_file_update_fails_if_contents_is_empty( + app, client: FlaskClient, with_bpmn_file_cleanup +): """Test_process_model_file_update.""" create_spec_file(app, client)