diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 114b78f52..f2d06e245 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 fdbdd52c3..cf47595c0 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-routers/tests/jobs/test_sandboxes.py b/diracx-routers/tests/jobs/test_sandboxes.py index fb7387a44..2422d900d 100644 --- a/diracx-routers/tests/jobs/test_sandboxes.py +++ b/diracx-routers/tests/jobs/test_sandboxes.py @@ -34,7 +34,7 @@ def normal_user_client(client_factory): def test_upload_then_download( normal_user_client: TestClient, test_auth_settings: AuthSettings ): - data = secrets.token_bytes(1024) + data = secrets.token_bytes(512) checksum = hashlib.sha256(data).hexdigest() # Initiate the upload @@ -85,7 +85,7 @@ def test_upload_then_download( def test_upload_oversized(normal_user_client: TestClient): - data = secrets.token_bytes(1024) + data = secrets.token_bytes(512) checksum = hashlib.sha256(data).hexdigest() # Initiate the upload @@ -125,7 +125,7 @@ def test_upload_oversized(normal_user_client: TestClient): def test_assign_then_unassign_sandboxes_to_jobs(normal_user_client: TestClient): - data = secrets.token_bytes(1024) + data = secrets.token_bytes(512) checksum = hashlib.sha256(data).hexdigest() # Upload Sandbox: