fix: address code review feedback
- Add inline safety comment for noqa: S608 (table_name from inspect) - Fix HTTPException detail to be a string (not dict) - Add aria-label to migration progress bar - Rename _noop to _NoOpContextManager in tests - Add explanatory comment for zip(strict=False) Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
@@ -31,7 +31,7 @@ class TestDatabaseApiEndpoints:
|
||||
def test_build_url_sqlite(self, client):
|
||||
"""Test building a SQLite URL as admin."""
|
||||
# Simulate admin session
|
||||
with client.session_transaction() if hasattr(client, "session_transaction") else _noop():
|
||||
with client.session_transaction() if hasattr(client, "session_transaction") else _NoOpContextManager():
|
||||
pass
|
||||
# Use the session cookie approach
|
||||
client.cookies.set("session", "test")
|
||||
@@ -148,7 +148,9 @@ class TestDatabaseWizardView:
|
||||
|
||||
|
||||
# Context manager helper for tests that don't need session_transaction
|
||||
class _noop:
|
||||
class _NoOpContextManager:
|
||||
"""Dummy context manager for tests that don't need session_transaction."""
|
||||
|
||||
def __enter__(self):
|
||||
return None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user