chore: depurar scripts obsoletos de migracion y pruebas legacy no requeridas
This commit is contained in:
@@ -13,18 +13,23 @@ from app.models.genetic_algorithm import (
|
||||
Gene
|
||||
)
|
||||
from app.services.optimizer_service import OptimizerService, OptimizerJobStatus
|
||||
from app.services.jwt_service import JWTService
|
||||
from config.config import Config
|
||||
|
||||
|
||||
class TestConfig(Config):
|
||||
SQLALCHEMY_DATABASE_URI = 'sqlite:///:memory:'
|
||||
TESTING = True
|
||||
WTF_CSRF_ENABLED = False
|
||||
|
||||
|
||||
class Sprint4OptimizerAndConcurrencyTestCase(unittest.TestCase):
|
||||
"""Pruebas exhaustivas para el Sprint 4: Optimizador Heurístico, Concurrencia y Spring Boot."""
|
||||
|
||||
def setUp(self):
|
||||
self.app = create_app()
|
||||
self.app.config['TESTING'] = True
|
||||
self.app.config['WTF_CSRF_ENABLED'] = False
|
||||
self.app = create_app(TestConfig)
|
||||
self.app_context = self.app.app_context()
|
||||
self.app_context.push()
|
||||
db.create_all()
|
||||
self.client = self.app.test_client()
|
||||
|
||||
# Obtener usuario existente o crear
|
||||
@@ -38,6 +43,7 @@ class Sprint4OptimizerAndConcurrencyTestCase(unittest.TestCase):
|
||||
self.user = User(
|
||||
name='Sprint 4 Admin',
|
||||
email='admin_sprint4@edu-space.com',
|
||||
role='ADMIN',
|
||||
role_id=admin_role.id,
|
||||
is_active=True
|
||||
)
|
||||
@@ -50,9 +56,9 @@ class Sprint4OptimizerAndConcurrencyTestCase(unittest.TestCase):
|
||||
if not self.classrooms:
|
||||
for i in range(1, 11):
|
||||
room = Classroom(
|
||||
room_number=f"AULA-{100 + i}",
|
||||
code=f"AULA-{100 + i}",
|
||||
building="Edificio Central",
|
||||
capacity=30 + (i * 5),
|
||||
is_virtual=(i == 10),
|
||||
is_active=True
|
||||
)
|
||||
db.session.add(room)
|
||||
@@ -68,7 +74,8 @@ class Sprint4OptimizerAndConcurrencyTestCase(unittest.TestCase):
|
||||
}
|
||||
|
||||
def tearDown(self):
|
||||
db.session.rollback()
|
||||
db.session.remove()
|
||||
db.drop_all()
|
||||
self.app_context.pop()
|
||||
|
||||
def test_01_fast_fitness_and_conflict_detection(self):
|
||||
|
||||
Reference in New Issue
Block a user