-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup_structure.py
More file actions
47 lines (39 loc) · 1.69 KB
/
Copy pathsetup_structure.py
File metadata and controls
47 lines (39 loc) · 1.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import os
from logic.structure_generator import generate_base_structure
from utils.logger import log_message
def test_structure_generation():
"""
Función para probar la generación de estructura de forma independiente.
"""
log_message("Ejecutando prueba de generación de estructura...", level="INFO")
# Respuestas de ejemplo para la prueba
answers_frontend = {
"project_type": "frontend",
"frontend_framework": "react",
"backend_framework": None,
"database": None
}
answers_backend = {
"project_type": "backend",
"frontend_framework": None,
"backend_framework": "fastapi",
"database": "postgresql"
}
answers_fullstack = {
"project_type": "fullstack",
"frontend_framework": "vue",
"backend_framework": "express",
"database": "mongodb"
}
test_project_name_frontend = "test_frontend_project"
test_project_name_backend = "test_backend_project"
test_project_name_fullstack = "test_fullstack_project"
log_message(f"Generando {test_project_name_frontend} (Frontend)...", level="INFO")
generate_base_structure(test_project_name_frontend, answers_frontend)
log_message(f"Generando {test_project_name_backend} (Backend)...", level="INFO")
generate_base_structure(test_project_name_backend, answers_backend)
log_message(f"Generando {test_project_name_fullstack} (Fullstack)...", level="INFO")
generate_base_structure(test_project_name_fullstack, answers_fullstack)
log_message("Prueba de generación de estructura finalizada. Puedes usar 'tree' para ver los resultados.", level="SUCCESS")
if __name__ == "__main__":
test_structure_generation()