@@ -42,6 +42,7 @@ async def test_index_item_respects_project_isolation_during_edit():
4242 causing notes to disappear from the search index.
4343 """
4444 from basic_memory import db
45+ from basic_memory .models .base import Base
4546 from basic_memory .repository .search_repository import SearchRepository
4647 from sqlalchemy .ext .asyncio import create_async_engine , async_sessionmaker
4748
@@ -51,7 +52,7 @@ async def test_index_item_respects_project_isolation_during_edit():
5152
5253 # Create the database schema
5354 async with engine .begin () as conn :
54- await conn .run_sync (db . Base .metadata .create_all )
55+ await conn .run_sync (Base .metadata .create_all )
5556
5657 # Create two projects
5758 async with db .scoped_session (session_maker ) as session :
@@ -178,6 +179,7 @@ async def test_index_item_respects_project_isolation_during_edit():
178179async def test_index_item_updates_existing_record_same_project ():
179180 """Test that index_item() correctly updates existing records within the same project."""
180181 from basic_memory import db
182+ from basic_memory .models .base import Base
181183 from basic_memory .repository .search_repository import SearchRepository
182184 from sqlalchemy .ext .asyncio import create_async_engine , async_sessionmaker
183185
@@ -187,7 +189,7 @@ async def test_index_item_updates_existing_record_same_project():
187189
188190 # Create the database schema
189191 async with engine .begin () as conn :
190- await conn .run_sync (db . Base .metadata .create_all )
192+ await conn .run_sync (Base .metadata .create_all )
191193
192194 # Create one project
193195 async with db .scoped_session (session_maker ) as session :
0 commit comments