Download tests/test_database_repair_sql.py from asnannp/DocDoeAI: direct link, hf CLI and curl.
- Browser
- Download file 591 Bytes
-
https://huggingface.co/spaces/asnannp/DocDoeAI/resolve/f954611a63e3bc3c736a8749dafc9030d7a94de9/tests/test_database_repair_sql.py
- Command line
-
hf download hf://spaces/asnannp/DocDoeAI@f954611a63e3bc3c736a8749dafc9030d7a94de9/tests/test_database_repair_sql.py
-
curl -L -o test_database_repair_sql.py https://huggingface.co/spaces/asnannp/DocDoeAI/resolve/f954611a63e3bc3c736a8749dafc9030d7a94de9/tests/test_database_repair_sql.py
591 Bytes
| from __future__ import annotations | |
| from pathlib import Path | |
| def test_phase_1_3_manual_migration_has_no_null_bytes() -> None: | |
| migration = Path(__file__).resolve().parents[1] / "migrations" / "phase_1_3_manual.sql" | |
| assert b"\x00" not in migration.read_bytes() | |
| def test_phase_1_3_manual_migration_uses_postgres_boolean_default() -> None: | |
| migration = Path(__file__).resolve().parents[1] / "migrations" / "phase_1_3_manual.sql" | |
| sql = migration.read_text(encoding="utf-8") | |
| assert "official_source BOOLEAN NOT NULL DEFAULT FALSE" in sql | |
| assert "DEFAULT 0" not in sql | |