|
7 | 7 | import pytest |
8 | 8 | from ispyb.sqlalchemy import BLSession, Person, Proposal, url |
9 | 9 | from sqlalchemy import create_engine |
| 10 | +from sqlalchemy.orm import Session as SQLAlchemySession |
10 | 11 | from sqlalchemy.orm import scoped_session, sessionmaker |
11 | | -from sqlmodel import Session |
12 | 12 |
|
13 | 13 | from murfey.util.db import Session as MurfeySession |
14 | 14 | from murfey.util.db import clear, setup |
@@ -123,9 +123,9 @@ def ispyb_session_factory(ispyb_engine): |
123 | 123 |
|
124 | 124 |
|
125 | 125 | @pytest.fixture |
126 | | -def ispyb_db(ispyb_session_factory) -> Generator[Session, None, None]: |
| 126 | +def ispyb_db(ispyb_session_factory) -> Generator[SQLAlchemySession, None, None]: |
127 | 127 | # Get a new session from the session factory |
128 | | - ispyb_db: Session = ispyb_session_factory() |
| 128 | + ispyb_db: SQLAlchemySession = ispyb_session_factory() |
129 | 129 |
|
130 | 130 | # Populate the ISPyB table with some default values |
131 | 131 | person_db_entry = Person( |
@@ -173,6 +173,6 @@ def start_postgres(): |
173 | 173 | setup(murfey_db_url) |
174 | 174 |
|
175 | 175 | murfey_session = MurfeySession(id=2, name="cm12345-6") |
176 | | - with Session(murfey_db_engine) as murfey_db: |
| 176 | + with SQLAlchemySession(murfey_db_engine) as murfey_db: |
177 | 177 | murfey_db.add(murfey_session) |
178 | 178 | murfey_db.commit() |
0 commit comments