style(test): format SQL query block tests with ruff

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Zamil Majdy
2026-03-28 02:39:16 +00:00
parent 22a5e76af9
commit db0e5a1b0b

View File

@@ -1080,7 +1080,9 @@ class TestMaxRowsEnforcement:
block = SQLQueryBlock()
creds = _make_credentials()
max_rows = 5
input_data = _make_input(creds, query="SELECT * FROM big_table", max_rows=max_rows)
input_data = _make_input(
creds, query="SELECT * FROM big_table", max_rows=max_rows
)
block.check_host_allowed = AsyncMock(return_value=["1.2.3.4"]) # type: ignore[assignment]
# Simulate the database returning exactly max_rows rows (truncated)
mock_rows = [{"id": i} for i in range(max_rows)]
@@ -1106,7 +1108,9 @@ class TestPasswordInErrorMessages:
def test_url_embedded_password_scrubbed(self):
"""://user:pass@ in error text must be replaced."""
conn = "postgresql://admin:hunter2@test.invalid:5432/db"
error = "could not connect: postgresql://admin:hunter2@test.invalid:5432/db refused"
error = (
"could not connect: postgresql://admin:hunter2@test.invalid:5432/db refused"
)
result = _sanitize_error(error, conn)
assert "hunter2" not in result