diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cdea17939c..23de364e6e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -88,7 +88,7 @@ repos: hooks: - id: shellcheck files: ^(?!.*(?:^|/)contrib(?:/|$)).*$ - args: ["-x", "--exclude=SC2317,SC2188,SC2143"] + args: ["-x", "--exclude=SC2317,SC2188,SC2143,SC2086,SC1091"] # Lint: Markdown - repo: https://github.com/igorshubovych/markdownlint-cli diff --git a/src/backend/tests/test_projects_routes.py b/src/backend/tests/test_projects_routes.py index 0915e436b7..4e839fa1b6 100644 --- a/src/backend/tests/test_projects_routes.py +++ b/src/backend/tests/test_projects_routes.py @@ -274,9 +274,9 @@ async def test_generate_project_files(db, client, project): ) assert response.status_code == 200 -async def test_update_project(client, admin_user, project): - """Test update project metadata""" +async def test_update_project(client, admin_user, project): + """Test update project metadata.""" updated_project_data = { "project_info": { "name": f"Updated Test Project {randint(1, 1000000)}", @@ -299,9 +299,7 @@ async def test_update_project(client, admin_user, project): }, } - response = client.put( - f"/projects/{project.id}", json=updated_project_data - ) + response = client.put(f"/projects/{project.id}", json=updated_project_data) if response.status_code != 200: log.error(response.json()) @@ -309,9 +307,19 @@ async def test_update_project(client, admin_user, project): response_data = response.json() # Assert that project_info in response_data matches updated_project_data - assert response_data["project_info"]["name"] == updated_project_data["project_info"]["name"] - assert response_data["project_info"]["short_description"] == updated_project_data["project_info"]["short_description"] - assert response_data["project_info"]["description"] == updated_project_data["project_info"]["description"] + assert ( + response_data["project_info"]["name"] + == updated_project_data["project_info"]["name"] + ) + assert ( + response_data["project_info"]["short_description"] + == updated_project_data["project_info"]["short_description"] + ) + assert ( + response_data["project_info"]["description"] + == updated_project_data["project_info"]["description"] + ) + if __name__ == "__main__": """Main func if file invoked directly."""