Debian Codegraph @

tests/test_cli.py

raw
1 from __future__ import annotations
2
3 import typing as t
4
5 import pytest
6
7 from flask_sqlalchemy import SQLAlchemy
8 from flask_sqlalchemy.cli import add_models_to_shell
9
10
11 @pytest.mark.usefixtures("app_ctx")
12 def test_shell_context(db: SQLAlchemy, Todo: t.Any) -> None:
13 context = add_models_to_shell()
14 assert context["db"] is db
15 assert context["Todo"] is Todo