Closed supreme-core closed 2 months ago
I am getting errors when the flask application exits and the context are popped off.
@pytest.fixture(scope="session") def app(): """CEUI app pytest fixture.""" _app = create_app() ctx = _app.app_context() ctx.push() yield _app > ctx.pop() tests/conftest.py:57: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ venv/lib/python3.8/site-packages/flask/ctx.py:253: in pop self.app.do_teardown_appcontext(exc) venv/lib/python3.8/site-packages/flask/app.py:2402: in do_teardown_appcontext self.ensure_sync(func)(exc) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <SQLAlchemy>, exc = None def _teardown_session(self, exc: BaseException | None) -> None: """Remove the current session at the end of the request. :meta private: .. versionadded:: 3.0 """ > self.session.remove() E AttributeError: 'Session' object has no attribute 'remove' venv/lib/python3.8/site-packages/flask_sqlalchemy/extension.py:448: AttributeError
Flask 2.2.5 Flask-Assets 2.1.0 flask-babel 4.0.0 Flask-Login 0.6.3 Flask-Mail 0.9.1 Flask-Migrate 4.0.7 Flask-Moment 1.0.5 Flask-Paranoid 0.3.0 flask-sqlalchemy 3.1.0 SQLAlchemy 2.0.19 sqlitedict 2.1.0
I am getting errors when the flask application exits and the context are popped off.