"""Test for project structure setup (T01).""" import os import pytest @pytest.mark.unit class TestProjectStructure: """Test project directory structure is correctly created.""" def test_src_directory_exists(self): """Verify src/openrouter_monitor/ directory exists.""" src_path = "/home/google/Sources/LucaSacchiNet/openrouter-watcher/src/openrouter_monitor" assert os.path.isdir(src_path), f"Directory {src_path} does not exist" def test_src_init_file_exists(self): """Verify src/openrouter_monitor/__init__.py exists.""" init_path = "/home/google/Sources/LucaSacchiNet/openrouter-watcher/src/openrouter_monitor/__init__.py" assert os.path.isfile(init_path), f"File {init_path} does not exist" def test_main_py_exists(self): """Verify main.py exists in src.""" main_path = "/home/google/Sources/LucaSacchiNet/openrouter-watcher/src/openrouter_monitor/main.py" assert os.path.isfile(main_path), f"File {main_path} does not exist" def test_config_py_exists(self): """Verify config.py exists in src.""" config_path = "/home/google/Sources/LucaSacchiNet/openrouter-watcher/src/openrouter_monitor/config.py" assert os.path.isfile(config_path), f"File {config_path} does not exist" def test_database_py_exists(self): """Verify database.py exists in src.""" db_path = "/home/google/Sources/LucaSacchiNet/openrouter-watcher/src/openrouter_monitor/database.py" assert os.path.isfile(db_path), f"File {db_path} does not exist" def test_models_directory_exists(self): """Verify models/ directory exists with __init__.py.""" models_path = "/home/google/Sources/LucaSacchiNet/openrouter-watcher/src/openrouter_monitor/models" init_path = os.path.join(models_path, "__init__.py") assert os.path.isdir(models_path), f"Directory {models_path} does not exist" assert os.path.isfile(init_path), f"File {init_path} does not exist" def test_routers_directory_exists(self): """Verify routers/ directory exists with __init__.py.""" routers_path = "/home/google/Sources/LucaSacchiNet/openrouter-watcher/src/openrouter_monitor/routers" init_path = os.path.join(routers_path, "__init__.py") assert os.path.isdir(routers_path), f"Directory {routers_path} does not exist" assert os.path.isfile(init_path), f"File {init_path} does not exist" def test_services_directory_exists(self): """Verify services/ directory exists with __init__.py.""" services_path = "/home/google/Sources/LucaSacchiNet/openrouter-watcher/src/openrouter_monitor/services" init_path = os.path.join(services_path, "__init__.py") assert os.path.isdir(services_path), f"Directory {services_path} does not exist" assert os.path.isfile(init_path), f"File {init_path} does not exist" def test_utils_directory_exists(self): """Verify utils/ directory exists with __init__.py.""" utils_path = "/home/google/Sources/LucaSacchiNet/openrouter-watcher/src/openrouter_monitor/utils" init_path = os.path.join(utils_path, "__init__.py") assert os.path.isdir(utils_path), f"Directory {utils_path} does not exist" assert os.path.isfile(init_path), f"File {init_path} does not exist" def test_tests_directory_structure(self): """Verify tests/ directory structure exists.""" tests_path = "/home/google/Sources/LucaSacchiNet/openrouter-watcher/tests" unit_path = os.path.join(tests_path, "unit") integration_path = os.path.join(tests_path, "integration") conftest_path = os.path.join(tests_path, "conftest.py") assert os.path.isdir(tests_path), f"Directory {tests_path} does not exist" assert os.path.isdir(unit_path), f"Directory {unit_path} does not exist" assert os.path.isfile(os.path.join(unit_path, "__init__.py")), f"unit/__init__.py does not exist" assert os.path.isdir(integration_path), f"Directory {integration_path} does not exist" assert os.path.isfile(os.path.join(integration_path, "__init__.py")), f"integration/__init__.py does not exist" assert os.path.isfile(conftest_path), f"File {conftest_path} does not exist" def test_alembic_directory_exists(self): """Verify alembic/ directory exists.""" alembic_path = "/home/google/Sources/LucaSacchiNet/openrouter-watcher/alembic" assert os.path.isdir(alembic_path), f"Directory {alembic_path} does not exist" def test_docs_directory_exists(self): """Verify docs/ directory exists.""" docs_path = "/home/google/Sources/LucaSacchiNet/openrouter-watcher/docs" assert os.path.isdir(docs_path), f"Directory {docs_path} does not exist" def test_scripts_directory_exists(self): """Verify scripts/ directory exists.""" scripts_path = "/home/google/Sources/LucaSacchiNet/openrouter-watcher/scripts" assert os.path.isdir(scripts_path), f"Directory {scripts_path} does not exist"