import pytest
from app import create_app, db
from sqlalchemy import inspect

def test_database_smoke(tmp_path):
    db_file = tmp_path / "test.db"
    app = create_app({"TESTING": True, "SQLALCHEMY_DATABASE_URI": f"sqlite:///{db_file}"})
    with app.app_context():
        db.drop_all()
        db.create_all()
        tables = inspect(db.engine).get_table_names()
        assert 'users' in tables or 'user' in tables
