From 309cc6546354922473b1a8360f80dd38cbca9283 Mon Sep 17 00:00:00 2001 From: Federico Stagni Date: Mon, 16 Sep 2024 09:16:03 +0200 Subject: [PATCH] fix: respond to comments --- .pre-commit-config.yaml | 7 ------- diracx-api/tests/test_jobs.py | 4 ++-- diracx-db/tests/jobs/test_jobDB.py | 1 + 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7b32e5de..03cc3fc5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -36,10 +36,3 @@ repos: - types-aiobotocore[essential] - boto3-stubs[essential] exclude: ^(diracx-client/src/diracx/client/|diracx-[a-z]+/tests/|diracx-testing/|build) - - - repo: https://github.com/asottile/pyupgrade - rev: v3.17.0 - hooks: - - id: pyupgrade - args: ["--py311-plus"] - exclude: ^(diracx-client/src/diracx/client/|diracx-cli/tests/|diracx-cli/src/diracx/cli/) diff --git a/diracx-api/tests/test_jobs.py b/diracx-api/tests/test_jobs.py index fdbdd52c..cf47595c 100644 --- a/diracx-api/tests/test_jobs.py +++ b/diracx-api/tests/test_jobs.py @@ -14,12 +14,12 @@ async def test_upload_download_sandbox(tmp_path, with_cli_login, caplog): input_files = [] input_file = input_directory / "input.dat" - input_file.write_bytes(secrets.token_bytes(1024)) + input_file.write_bytes(secrets.token_bytes(512)) input_files.append(input_file) input_file = input_directory / "a" / "b" / "c" / "nested.dat" input_file.parent.mkdir(parents=True) - input_file.write_bytes(secrets.token_bytes(1024)) + input_file.write_bytes(secrets.token_bytes(512)) input_files.append(input_file) # Upload the sandbox diff --git a/diracx-db/tests/jobs/test_jobDB.py b/diracx-db/tests/jobs/test_jobDB.py index bd4c33eb..a057d4fc 100644 --- a/diracx-db/tests/jobs/test_jobDB.py +++ b/diracx-db/tests/jobs/test_jobDB.py @@ -27,6 +27,7 @@ async def job_db(tmp_path): await conn.run_sync(job_db.metadata.create_all) yield job_db + async def test_search_parameters(job_db): """Test that we can search specific parameters for jobs in the database.""" async with job_db as job_db: