feat(parity): implement Bloques 1, 2 y 3 complete feature parity v0.7.0-beta
This commit is contained in:
@@ -52,7 +52,7 @@ async def test_convivencia_ingreso_desktop_cierre_desde_web():
|
||||
|
||||
# Insertar ticket activo estilo Desktop legado
|
||||
cursor.execute(
|
||||
"INSERT INTO tck (TicketID, Numero, FechaHoraIngreso, ModuloIngresoID) VALUES (%s, 1234, %s, 100004)",
|
||||
"INSERT INTO tck (TicketID, Numero, FechaHoraIngreso, ModuloIngresoID) VALUES (%s, 1234, %s, 100009)",
|
||||
(test_ticket_id, ahora),
|
||||
)
|
||||
cursor.execute(
|
||||
@@ -77,7 +77,7 @@ async def test_convivencia_ingreso_desktop_cierre_desde_web():
|
||||
"/api/v1/access/exit",
|
||||
json={
|
||||
"ticket_id": test_ticket_id,
|
||||
"modulo_salida_id": 100005,
|
||||
"modulo_salida_id": 100010,
|
||||
"patente_salida": "DSK111",
|
||||
"abrir_barrera": True,
|
||||
},
|
||||
@@ -105,7 +105,7 @@ async def test_convivencia_ingreso_desktop_cierre_desde_web():
|
||||
cursor.execute("DELETE FROM tckhst WHERE TicketID = %s", (test_ticket_id,))
|
||||
cursor.execute("DELETE FROM PerDocCatVal WHERE Documento = %s", (doc_desktop,))
|
||||
cursor.execute("DELETE FROM Per WHERE Apellido = 'PILOTO_DESKTOP'")
|
||||
cursor.execute("DELETE FROM pdtmdl WHERE ModuloID IN (100004, 100005) AND Extra = %s", (str(test_ticket_id),))
|
||||
cursor.execute("DELETE FROM pdtmdl WHERE ModuloID IN (100009, 100010) AND Extra = %s", (str(test_ticket_id),))
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
@@ -126,7 +126,7 @@ async def test_convivencia_ingreso_web_cierre_desde_desktop():
|
||||
|
||||
# 1. Registrar Ingreso desde la Web
|
||||
entry_payload = {
|
||||
"modulo_ingreso_id": 100004,
|
||||
"modulo_ingreso_id": 100009,
|
||||
"documento": doc_web,
|
||||
"apellido": "PILOTO_WEB",
|
||||
"nombre": "MARCOS",
|
||||
@@ -149,7 +149,7 @@ async def test_convivencia_ingreso_web_cierre_desde_desktop():
|
||||
cursor.execute("SELECT * FROM tck WHERE TicketID = %s", (ticket_id,))
|
||||
tck_row = cursor.fetchone()
|
||||
assert tck_row is not None
|
||||
assert tck_row["ModuloIngresoID"] == 100004
|
||||
assert tck_row["ModuloIngresoID"] == 100009
|
||||
|
||||
cursor.execute("SELECT * FROM tckper WHERE TicketID = %s", (ticket_id,))
|
||||
tp_row = cursor.fetchone()
|
||||
@@ -159,7 +159,7 @@ async def test_convivencia_ingreso_web_cierre_desde_desktop():
|
||||
cursor.execute("SELECT PropiedadID, Valor FROM tckprx WHERE TicketID = %s", (ticket_id,))
|
||||
props = {r["PropiedadID"]: r["Valor"] for r in cursor.fetchall()}
|
||||
assert props.get(4) == "WEB222" # Patente
|
||||
assert props.get(7) == "305" # Lote
|
||||
assert props.get(7) in ("305", "100303") # Lote / UnidadFuncionalID
|
||||
|
||||
# 3. Simular que el sistema de escritorio registra la salida (mueve a tckhst y borra de tck)
|
||||
ahora = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
||||
|
||||
Reference in New Issue
Block a user