17 lines
322 B
Python
17 lines
322 B
Python
from sqlalchemy.orm import Session
|
|
from app.core.database import Base, get_db
|
|
|
|
|
|
def test_get_db_yields_session():
|
|
gen = get_db()
|
|
db = next(gen)
|
|
assert isinstance(db, Session)
|
|
try:
|
|
next(gen)
|
|
except StopIteration:
|
|
pass
|
|
|
|
|
|
def test_base_has_metadata():
|
|
assert Base.metadata is not None
|