- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 35 for sql (0.11 sec)
-
docs_src/sql_databases/sql_app_py39/tests/test_sql_app.py
Sebastiรกn Ramรญrez <******@****.***> 1641564691 +0100
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Jan 07 14:11:31 GMT 2022 - 1.2K bytes - Viewed (0) -
tests/test_tutorial/test_sql_databases/test_sql_databases_middleware.py
from ...utils import needs_pydanticv1 @pytest.fixture(scope="module") def client(): test_db = Path("./sql_app.db") if test_db.is_file(): # pragma: nocover test_db.unlink() # Import while creating the client to create the DB after starting the test session from docs_src.sql_databases.sql_app import alt_main # Ensure import side effects are re-executed importlib.reload(alt_main)
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Wed Mar 13 19:07:10 GMT 2024 - 16.3K bytes - Viewed (0) -
tests/test_tutorial/test_sql_databases/test_sql_databases_middleware_py310.py
tmp_path = tmp_path_factory.mktemp("data") cwd = os.getcwd() os.chdir(tmp_path) test_db = Path("./sql_app.db") if test_db.is_file(): # pragma: nocover test_db.unlink() # Import while creating the client to create the DB after starting the test session from docs_src.sql_databases.sql_app_py310 import alt_main # Ensure import side effects are re-executed importlib.reload(alt_main)
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Wed Mar 13 19:07:10 GMT 2024 - 16.5K bytes - Viewed (0) -
docs_src/sql_databases/sql_app/tests/test_sql_app.py
Harsha Laxman <******@****.***> 1687432812 -0700
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Jun 22 11:20:12 GMT 2023 - 1.2K bytes - Viewed (0) -
tests/test_tutorial/test_sql_databases/test_sql_databases_py310.py
tmp_path = tmp_path_factory.mktemp("data") cwd = os.getcwd() os.chdir(tmp_path) test_db = Path("./sql_app.db") if test_db.is_file(): # pragma: nocover test_db.unlink() # Import while creating the client to create the DB after starting the test session from docs_src.sql_databases.sql_app_py310 import main # Ensure import side effects are re-executed importlib.reload(main)
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Wed Mar 13 19:07:10 GMT 2024 - 16.5K bytes - Viewed (0) -
tests/test_tutorial/test_sql_databases/test_sql_databases_py39.py
tmp_path = tmp_path_factory.mktemp("data") cwd = os.getcwd() os.chdir(tmp_path) test_db = Path("./sql_app.db") if test_db.is_file(): # pragma: nocover test_db.unlink() # Import while creating the client to create the DB after starting the test session from docs_src.sql_databases.sql_app_py39 import main # Ensure import side effects are re-executed importlib.reload(main)
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Wed Mar 13 19:07:10 GMT 2024 - 16.5K bytes - Viewed (0) -
tests/test_tutorial/test_sql_databases/test_sql_databases_middleware_py39.py
tmp_path = tmp_path_factory.mktemp("data") cwd = os.getcwd() os.chdir(tmp_path) test_db = Path("./sql_app.db") if test_db.is_file(): # pragma: nocover test_db.unlink() # Import while creating the client to create the DB after starting the test session from docs_src.sql_databases.sql_app_py39 import alt_main # Ensure import side effects are re-executed importlib.reload(alt_main)
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Wed Mar 13 19:07:10 GMT 2024 - 16.5K bytes - Viewed (0) -
docs/en/docs/advanced/testing-database.md
{!../../../docs_src/sql_databases/sql_app/tests/test_sql_app.py!} ``` !!! tip The code for `override_get_db()` is almost exactly the same as for `get_db()`, but in `override_get_db()` we use the `TestingSessionLocal` for the testing database instead. ## Test the app Then we can just test the app as normally. ```Python hl_lines="32-47" {!../../../docs_src/sql_databases/sql_app/tests/test_sql_app.py!} ```
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 3.5K bytes - Viewed (0) -
docs/em/docs/advanced/testing-database.md
``` ๐ ๐ ๐ค `main.py`, โ๏ธ โธ `main.py` โ๏ธ ๐ฝ ๐ `sql_app.db`, & ๐ฅ ๐ช โ ๐ญ ๐ฅ โ `test.db` ๐ฏ. ๐ฅ ๐ฎ ๐ โธ ๐ฅ, โฎ๏ธ ๐ ๐. ```Python hl_lines="16" {!../../../docs_src/sql_databases/sql_app/tests/test_sql_app.py!} ``` ## ๐ ๐ ๐ ๐ฅ โ ๐ ๐ & ๐ฎ โซ๏ธ ๐ ๐ ๐ฑ. ```Python hl_lines="19-24 27" {!../../../docs_src/sql_databases/sql_app/tests/test_sql_app.py!} ``` !!! tip
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Apr 01 09:26:04 GMT 2023 - 2.6K bytes - Viewed (0) -
docs_src/sql_databases/sql_app_py310/database.py
from sqlalchemy import create_engine from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker SQLALCHEMY_DATABASE_URL = "sqlite:///./sql_app.db" # SQLALCHEMY_DATABASE_URL = "postgresql://user:password@postgresserver/db" engine = create_engine( SQLALCHEMY_DATABASE_URL, connect_args={"check_same_thread": False} ) SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Jan 07 14:11:31 GMT 2022 - 461 bytes - Viewed (0)