formatting fixes
This commit is contained in:
@@ -35,7 +35,7 @@ def test_get_db_closes_session() -> None:
|
||||
assert db.is_active
|
||||
|
||||
# Patch the close method to verify it gets called
|
||||
with patch.object(db, 'close', wraps=db.close) as mock_close:
|
||||
with patch.object(db, "close", wraps=db.close) as mock_close:
|
||||
# Complete the generator to trigger finally block
|
||||
try:
|
||||
next(db_generator)
|
||||
@@ -60,7 +60,7 @@ def test_get_db_closes_on_exception() -> None:
|
||||
assert db.is_active
|
||||
|
||||
# Patch close to verify it gets called even with an exception
|
||||
with patch.object(db, 'close', wraps=db.close) as mock_close:
|
||||
with patch.object(db, "close", wraps=db.close) as mock_close:
|
||||
try:
|
||||
# Simulate an exception occurring during request processing
|
||||
raise ValueError("Simulated error during request")
|
||||
@@ -82,6 +82,7 @@ def test_get_db_closes_on_exception() -> None:
|
||||
# Verify db was created
|
||||
assert db is not None
|
||||
|
||||
|
||||
# def test_init_db_creates_directory(tmp_path: Path) -> None:
|
||||
# """Test that init_db creates the data directory."""
|
||||
# import os
|
||||
|
||||
Reference in New Issue
Block a user