v1.0 - Version stable: multi-PC, détection UI-DETR-1, 3 modes exécution
- Frontend v4 accessible sur réseau local (192.168.1.40) - Ports ouverts: 3002 (frontend), 5001 (backend), 5004 (dashboard) - Ollama GPU fonctionnel - Self-healing interactif - Dashboard confiance Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
102
test_agent_upload_simple.py
Normal file
102
test_agent_upload_simple.py
Normal file
@@ -0,0 +1,102 @@
|
||||
1) elsecess0 if suct( exiload()
|
||||
t_uptes= cess
|
||||
suc_":main_e__ == "__ __nam
|
||||
|
||||
ifrn Falsetu re
|
||||
xc()t_eprinceback. tra ck
|
||||
t traceba impor")
|
||||
eur: {e}t(f"❌ Err prin as e:
|
||||
ption xce except E
|
||||
False
|
||||
return ")
|
||||
uécho"❌ Upload ét( prin else:
|
||||
e
|
||||
run T retur réussi!")
|
||||
✓ Upload nt(" pri ccess:
|
||||
if su
|
||||
path)
|
||||
unlink(zip_
|
||||
os.yer# Netto
|
||||
|
||||
etries=1)uth", max_rt_session_a"tes_path, sion_zip(zipes upload_s success = ad...")
|
||||
tive d'uplo("Tenta print
|
||||
ter l'upload Ten #
|
||||
)
|
||||
ath}"{zip_p test créé: ichier de✓ Ft(f" prinp()
|
||||
ziession_eate_test_sh = cr zip_pat
|
||||
est tn fichier de # Créer u
|
||||
_zip
|
||||
d_sessionploat uder imporloa from upy:
|
||||
tr)
|
||||
|
||||
}..."{token[:16]é: argn ch"✓ Toke print(f
|
||||
|
||||
lsern Fa retuuvé")
|
||||
MIN non troPA_TOKEN_AD Token Rt("❌ print token:
|
||||
if noADMIN')
|
||||
N_et('RPA_TOKEos.environ.gken =
|
||||
totokener le # Vérifi
|
||||
")
|
||||
v0 ===d agentst d'uploa= Teint("== pr"""
|
||||
v0. l'agentr dec l'uploadeoad avest l'upl """Teupload():
|
||||
f test_h
|
||||
|
||||
dern zip_pat
|
||||
retu son)
|
||||
session_jn",_auth.jsoionssset_h/tesssion_aut_se"testitestr(fwr zf.dent=2)
|
||||
ta, indaon_umps(sessi= json.don_json ssi seue
|
||||
nd atteructureréer la st # Czf:
|
||||
th, 'w') as _paFile(zipile.Zipipfwith z
|
||||
file.name
|
||||
th = tmp_zip_pae:
|
||||
p_fillse) as tm=Faetep', delix='.zie(suffraryFilpoTemile.Namedh tempf
|
||||
witraire tempochier ZIP Créer un fi
|
||||
#
|
||||
|
||||
}: []ots"reensh "sc ],
|
||||
}
|
||||
0
|
||||
"y": 20 00,
|
||||
x": 1 " 0Z",
|
||||
00:38:026-01-05T1 "2imestamp":"t
|
||||
"click",e": "typ {
|
||||
|
||||
": [ "eventser",
|
||||
"test_us "user":
|
||||
18:01:00Z",-05T01 "2026-ded_at": "en:00Z",
|
||||
0026-01-05T18:_at": "20"started h",
|
||||
ion_aut"test_sessn_id": sessio "= {
|
||||
n_data session factice
|
||||
ssioe se# Créer un"""
|
||||
actice. session fest avec une ZIP de t un fichier""Crée:
|
||||
"on_zip()essist_sef create_te
|
||||
d))
|
||||
agent_v0"parent / "(__file__).Pathtr(ert(0, spath.insh
|
||||
sys.au patgent_v0 artoireer le répe
|
||||
|
||||
# Ajoutnv_local()d_eloa
|
||||
ronnementables d'envir les variharge
|
||||
|
||||
# Ctrip() = value.s()]on[key.stripnvir os.e )
|
||||
it('=', 1splne. value = li key, :
|
||||
'=' in line('#') and tswith.starlinet ine and no if l )
|
||||
ine.strip(= l line f:
|
||||
or line in f
|
||||
as f:path, 'r') env_ with open( h}")
|
||||
atnt de {env_pf"Chargeme print():
|
||||
ath.exists(v_p
|
||||
if enocal").lh(".envat = Penv_pathal():
|
||||
oc_env_ldef loadement
|
||||
xplicitocal eenv.l# Charger .
|
||||
|
||||
import Pathpathlib json
|
||||
from t impor
|
||||
le zipfifile
|
||||
importmport temprt sys
|
||||
ios
|
||||
impot "
|
||||
|
||||
impor"nt.
|
||||
"me'environneles dabri des vaementec charggent v0 avad de l'aple d'uplo
|
||||
Test sim"ython3
|
||||
""/env p/bin/usr#!
|
||||
Reference in New Issue
Block a user