diff --git a/tools/fakeportal/etud_minimal_template.xml b/tools/fakeportal/etud_minimal_template.xml index 2c969615..a8d0fc38 100644 --- a/tools/fakeportal/etud_minimal_template.xml +++ b/tools/fakeportal/etud_minimal_template.xml @@ -1,5 +1,6 @@ {nip} + {ine} {etape} {gender} {nom} diff --git a/tools/fakeportal/etud_template.xml b/tools/fakeportal/etud_template.xml index c6243be7..fd15ad84 100644 --- a/tools/fakeportal/etud_template.xml +++ b/tools/fakeportal/etud_template.xml @@ -1,5 +1,6 @@ {nip} + {ine} {etape} {etape}/117 {diplome}/117 diff --git a/tools/fakeportal/fakeportal.py b/tools/fakeportal/fakeportal.py index 7e9abe7e..33b81f65 100755 --- a/tools/fakeportal/fakeportal.py +++ b/tools/fakeportal/fakeportal.py @@ -44,9 +44,11 @@ else: } # Etudiant avec tous les champs (USPN) -ETUD_TEMPLATE_FULL = open(script_dir / "etud_template.xml").read() +ETUD_TEMPLATE_FULL = open(script_dir / "etud_template.xml", encoding="UTF-8").read() # Etudiant avec seulement les champs requis -ETUD_TEMPLATE_MINI = open(script_dir / "etud_minimal_template.xml").read() +ETUD_TEMPLATE_MINI = open( + script_dir / "etud_minimal_template.xml", encoding="UTF-8" +).read() ETUD_HEAD = """ """ @@ -68,6 +70,7 @@ def make_random_etud(nip, etape=None, annee=None, template=ETUD_TEMPLATE_FULL): diplome = "VDRT" data = template.format( nip=nip, + ine=str(random.randint(1000000000, 9999999999)) + "Z", gender=gender, nom=nom, prenom=prenom,