From b2384f2869706dd221e0b67b94e3e86544726edd Mon Sep 17 00:00:00 2001 From: Scott Idem Date: Fri, 16 Jan 2026 10:46:19 -0500 Subject: [PATCH] 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. --- tests/{ => archive}/check_db_schema.py | 0 tests/{ => archive}/check_site_schema.py | 0 tests/{test_agent_bridge.py => e2e/test_e2e_agent_bridge.py} | 0 .../test_e2e_legacy_remote_schema.py} | 0 tests/{test_site_lookup.py => e2e/test_e2e_site_bootstrap.py} | 0 tests/{test_v3_accounts.py => e2e/test_e2e_v3_accounts.py} | 0 tests/{test_v3_extra.py => e2e/test_e2e_v3_extra_filters.py} | 0 tests/{test_v3_schema.py => e2e/test_e2e_v3_schema.py} | 0 tests/{test_v3_search.py => e2e/test_e2e_v3_search.py} | 0 .../test_e2e_v3_security_exceptions.py} | 0 .../test_int_boot_diagnosis.py} | 3 +++ .../test_int_db_connectivity.py} | 0 tests/{verify_email.py => integration/test_int_email_live.py} | 0 .../test_int_import_verification.py} | 0 .../test_int_schema_v3.py} | 2 +- .../test_int_v3_auth_security.py} | 0 tests/{conftest_mock.py => mock_config_helper.py} | 0 .../tool_generate_registry.py} | 0 .../tool_mcp_docker_explorer.py} | 0 tests/{test_email_configuration.py => unit/test_unit_email.py} | 0 tests/{verify_email_safe.py => unit/test_unit_email_safe.py} | 0 tests/{test_v3_error_bubbling.py => unit/test_unit_errors.py} | 0 tests/{test_v3_filtering.py => unit/test_unit_filtering.py} | 0 tests/{test_model_validation.py => unit/test_unit_models.py} | 0 .../test_unit_payload_sanitization.py} | 0 .../test_unit_router_stripping.py} | 0 .../test_unit_schema_logic.py} | 0 27 files changed, 4 insertions(+), 1 deletion(-) rename tests/{ => archive}/check_db_schema.py (100%) rename tests/{ => archive}/check_site_schema.py (100%) rename tests/{test_agent_bridge.py => e2e/test_e2e_agent_bridge.py} (100%) rename tests/{check_site_schema_remote.py => e2e/test_e2e_legacy_remote_schema.py} (100%) rename tests/{test_site_lookup.py => e2e/test_e2e_site_bootstrap.py} (100%) rename tests/{test_v3_accounts.py => e2e/test_e2e_v3_accounts.py} (100%) rename tests/{test_v3_extra.py => e2e/test_e2e_v3_extra_filters.py} (100%) rename tests/{test_v3_schema.py => e2e/test_e2e_v3_schema.py} (100%) rename tests/{test_v3_search.py => e2e/test_e2e_v3_search.py} (100%) rename tests/{verify_v3_exceptions.py => e2e/test_e2e_v3_security_exceptions.py} (100%) rename tests/{diagnose_boot.py => integration/test_int_boot_diagnosis.py} (95%) rename tests/{standalone_db_test.py => integration/test_int_db_connectivity.py} (100%) rename tests/{verify_email.py => integration/test_int_email_live.py} (100%) rename tests/{verify_imports.py => integration/test_int_import_verification.py} (100%) rename tests/{verify_schema_logic.py => integration/test_int_schema_v3.py} (98%) rename tests/{test_v3_auth_isolation.py => integration/test_int_v3_auth_security.py} (100%) rename tests/{conftest_mock.py => mock_config_helper.py} (100%) rename tests/{generate_registry_live.py => tools/tool_generate_registry.py} (100%) rename tests/{mcp_docker_explorer.py => tools/tool_mcp_docker_explorer.py} (100%) rename tests/{test_email_configuration.py => unit/test_unit_email.py} (100%) rename tests/{verify_email_safe.py => unit/test_unit_email_safe.py} (100%) rename tests/{test_v3_error_bubbling.py => unit/test_unit_errors.py} (100%) rename tests/{test_v3_filtering.py => unit/test_unit_filtering.py} (100%) rename tests/{test_model_validation.py => unit/test_unit_models.py} (100%) rename tests/{verify_feedback_fixes.py => unit/test_unit_payload_sanitization.py} (100%) rename tests/{test_v3_router_filtering.py => unit/test_unit_router_stripping.py} (100%) rename tests/{test_lib_schema_isolated.py => unit/test_unit_schema_logic.py} (100%) diff --git a/tests/check_db_schema.py b/tests/archive/check_db_schema.py similarity index 100% rename from tests/check_db_schema.py rename to tests/archive/check_db_schema.py diff --git a/tests/check_site_schema.py b/tests/archive/check_site_schema.py similarity index 100% rename from tests/check_site_schema.py rename to tests/archive/check_site_schema.py diff --git a/tests/test_agent_bridge.py b/tests/e2e/test_e2e_agent_bridge.py similarity index 100% rename from tests/test_agent_bridge.py rename to tests/e2e/test_e2e_agent_bridge.py diff --git a/tests/check_site_schema_remote.py b/tests/e2e/test_e2e_legacy_remote_schema.py similarity index 100% rename from tests/check_site_schema_remote.py rename to tests/e2e/test_e2e_legacy_remote_schema.py diff --git a/tests/test_site_lookup.py b/tests/e2e/test_e2e_site_bootstrap.py similarity index 100% rename from tests/test_site_lookup.py rename to tests/e2e/test_e2e_site_bootstrap.py diff --git a/tests/test_v3_accounts.py b/tests/e2e/test_e2e_v3_accounts.py similarity index 100% rename from tests/test_v3_accounts.py rename to tests/e2e/test_e2e_v3_accounts.py diff --git a/tests/test_v3_extra.py b/tests/e2e/test_e2e_v3_extra_filters.py similarity index 100% rename from tests/test_v3_extra.py rename to tests/e2e/test_e2e_v3_extra_filters.py diff --git a/tests/test_v3_schema.py b/tests/e2e/test_e2e_v3_schema.py similarity index 100% rename from tests/test_v3_schema.py rename to tests/e2e/test_e2e_v3_schema.py diff --git a/tests/test_v3_search.py b/tests/e2e/test_e2e_v3_search.py similarity index 100% rename from tests/test_v3_search.py rename to tests/e2e/test_e2e_v3_search.py diff --git a/tests/verify_v3_exceptions.py b/tests/e2e/test_e2e_v3_security_exceptions.py similarity index 100% rename from tests/verify_v3_exceptions.py rename to tests/e2e/test_e2e_v3_security_exceptions.py diff --git a/tests/diagnose_boot.py b/tests/integration/test_int_boot_diagnosis.py similarity index 95% rename from tests/diagnose_boot.py rename to tests/integration/test_int_boot_diagnosis.py index bb26a1c..1be6d39 100644 --- a/tests/diagnose_boot.py +++ b/tests/integration/test_int_boot_diagnosis.py @@ -1,6 +1,9 @@ import sys import os +# Add project root to path +sys.path.append(os.getcwd()) + print("--- Starting Import Diagnosis ---") try: diff --git a/tests/standalone_db_test.py b/tests/integration/test_int_db_connectivity.py similarity index 100% rename from tests/standalone_db_test.py rename to tests/integration/test_int_db_connectivity.py diff --git a/tests/verify_email.py b/tests/integration/test_int_email_live.py similarity index 100% rename from tests/verify_email.py rename to tests/integration/test_int_email_live.py diff --git a/tests/verify_imports.py b/tests/integration/test_int_import_verification.py similarity index 100% rename from tests/verify_imports.py rename to tests/integration/test_int_import_verification.py diff --git a/tests/verify_schema_logic.py b/tests/integration/test_int_schema_v3.py similarity index 98% rename from tests/verify_schema_logic.py rename to tests/integration/test_int_schema_v3.py index f68afdb..651448f 100644 --- a/tests/verify_schema_logic.py +++ b/tests/integration/test_int_schema_v3.py @@ -8,7 +8,7 @@ from sqlalchemy import text sys.path.append(os.getcwd()) # MUST BE FIRST: Mock app.config -import tests.conftest_mock +import tests.mock_config_helper # Connection details from .env (Bypassing app.config) DB_USER = "aether_dev" diff --git a/tests/test_v3_auth_isolation.py b/tests/integration/test_int_v3_auth_security.py similarity index 100% rename from tests/test_v3_auth_isolation.py rename to tests/integration/test_int_v3_auth_security.py diff --git a/tests/conftest_mock.py b/tests/mock_config_helper.py similarity index 100% rename from tests/conftest_mock.py rename to tests/mock_config_helper.py diff --git a/tests/generate_registry_live.py b/tests/tools/tool_generate_registry.py similarity index 100% rename from tests/generate_registry_live.py rename to tests/tools/tool_generate_registry.py diff --git a/tests/mcp_docker_explorer.py b/tests/tools/tool_mcp_docker_explorer.py similarity index 100% rename from tests/mcp_docker_explorer.py rename to tests/tools/tool_mcp_docker_explorer.py diff --git a/tests/test_email_configuration.py b/tests/unit/test_unit_email.py similarity index 100% rename from tests/test_email_configuration.py rename to tests/unit/test_unit_email.py diff --git a/tests/verify_email_safe.py b/tests/unit/test_unit_email_safe.py similarity index 100% rename from tests/verify_email_safe.py rename to tests/unit/test_unit_email_safe.py diff --git a/tests/test_v3_error_bubbling.py b/tests/unit/test_unit_errors.py similarity index 100% rename from tests/test_v3_error_bubbling.py rename to tests/unit/test_unit_errors.py diff --git a/tests/test_v3_filtering.py b/tests/unit/test_unit_filtering.py similarity index 100% rename from tests/test_v3_filtering.py rename to tests/unit/test_unit_filtering.py diff --git a/tests/test_model_validation.py b/tests/unit/test_unit_models.py similarity index 100% rename from tests/test_model_validation.py rename to tests/unit/test_unit_models.py diff --git a/tests/verify_feedback_fixes.py b/tests/unit/test_unit_payload_sanitization.py similarity index 100% rename from tests/verify_feedback_fixes.py rename to tests/unit/test_unit_payload_sanitization.py diff --git a/tests/test_v3_router_filtering.py b/tests/unit/test_unit_router_stripping.py similarity index 100% rename from tests/test_v3_router_filtering.py rename to tests/unit/test_unit_router_stripping.py diff --git a/tests/test_lib_schema_isolated.py b/tests/unit/test_unit_schema_logic.py similarity index 100% rename from tests/test_lib_schema_isolated.py rename to tests/unit/test_unit_schema_logic.py