Tests: Reorganize test suite into functional subdirectories
- Categorized scripts into tests/unit/, tests/integration/, tests/e2e/, and tests/tools/. - Adopted consistent naming prefixes (test_unit_*, test_int_*, test_e2e_*, tool_*). - Renamed conftest_mock.py to mock_config_helper.py for clarity. - Updated test_int_boot_diagnosis.py with sys.path setup for root-level execution.
This commit is contained in:
13
tests/archive/check_db_schema.py
Normal file
13
tests/archive/check_db_schema.py
Normal file
@@ -0,0 +1,13 @@
|
||||
from app.db_sql import db
|
||||
from sqlalchemy import text
|
||||
|
||||
def check_columns():
|
||||
try:
|
||||
result = db.execute(text("DESCRIBE account"))
|
||||
columns = [row[0] for row in result.fetchall()]
|
||||
print(f"Columns in 'account': {columns}")
|
||||
except Exception as e:
|
||||
print(f"Error describing 'account': {e}")
|
||||
|
||||
if __name__ == "__main__":
|
||||
check_columns()
|
||||
19
tests/archive/check_site_schema.py
Normal file
19
tests/archive/check_site_schema.py
Normal file
@@ -0,0 +1,19 @@
|
||||
from app.db_sql import db
|
||||
from sqlalchemy import text
|
||||
|
||||
def check_schema(name):
|
||||
print(f"--- Schema for {name} ---")
|
||||
try:
|
||||
result = db.execute(text(f"DESCRIBE `{name}`"))
|
||||
for row in result.fetchall():
|
||||
print(f" {row[0]} ({row[1]})")
|
||||
except Exception as e:
|
||||
print(f" Error: {e}")
|
||||
print("-" * 30)
|
||||
|
||||
if __name__ == "__main__":
|
||||
# Check tables
|
||||
check_schema("site")
|
||||
check_schema("site_domain")
|
||||
# Check views used in CRUD V3
|
||||
check_schema("v_site_domain")
|
||||
Reference in New Issue
Block a user