File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 66from sqlalchemy .orm import sessionmaker
77
88from app .models import Role
9+ from app .models .AvailableTime import available_times
10+ from app .models .TimeBlock import TimeBlock
911from app .models .User import User
1012from app .schemas .user import (
1113 SignUpMethod ,
@@ -72,6 +74,9 @@ def db_session():
7274 # Create only the tables needed for these tests to avoid JSONB (Postgres-only) issues under SQLite
7375 Role .__table__ .create (bind = engine , checkfirst = True )
7476 User .__table__ .create (bind = engine , checkfirst = True )
77+ # Additional tables referenced by User relationships
78+ TimeBlock .__table__ .create (bind = engine , checkfirst = True )
79+ available_times .create (bind = engine , checkfirst = True )
7580
7681 session = TestingSessionLocal ()
7782
@@ -96,6 +101,8 @@ def db_session():
96101 session .rollback ()
97102 session .close ()
98103 # Clean up - drop only the tables we created
104+ available_times .drop (bind = engine , checkfirst = True )
105+ TimeBlock .__table__ .drop (bind = engine , checkfirst = True )
99106 User .__table__ .drop (bind = engine , checkfirst = True )
100107 Role .__table__ .drop (bind = engine , checkfirst = True )
101108
You can’t perform that action at this time.
0 commit comments