2022-03-02 16:45:47 +01:00
|
|
|
|
################################################## Tests ##############################################################
|
|
|
|
|
|
2022-04-13 12:39:10 +02:00
|
|
|
|
|
|
|
|
|
# XXX OBSOLETE ??? XXX
|
|
|
|
|
|
2022-03-02 16:45:47 +01:00
|
|
|
|
import requests
|
|
|
|
|
import os
|
|
|
|
|
|
|
|
|
|
from app import models
|
|
|
|
|
from app.api import bp, requested_format
|
|
|
|
|
from app.api.auth import token_auth
|
|
|
|
|
from app.api.errors import error_response
|
|
|
|
|
|
2022-03-10 17:43:12 +01:00
|
|
|
|
SCODOC_USER = "test"
|
|
|
|
|
SCODOC_PASSWORD = "test"
|
2022-03-02 16:45:47 +01:00
|
|
|
|
SCODOC_URL = "http://192.168.1.12:5000"
|
|
|
|
|
CHECK_CERTIFICATE = bool(int(os.environ.get("CHECK_CERTIFICATE", False)))
|
|
|
|
|
|
2022-03-04 17:16:08 +01:00
|
|
|
|
HEADERS = None
|
|
|
|
|
|
2022-04-13 12:39:10 +02:00
|
|
|
|
|
2022-03-04 17:16:08 +01:00
|
|
|
|
def get_token():
|
|
|
|
|
"""
|
|
|
|
|
Permet de set le token dans le header
|
|
|
|
|
"""
|
|
|
|
|
global HEADERS
|
2022-03-09 16:52:07 +01:00
|
|
|
|
global SCODOC_USER
|
|
|
|
|
global SCODOC_PASSWORD
|
|
|
|
|
|
2022-03-04 17:16:08 +01:00
|
|
|
|
r0 = requests.post(
|
|
|
|
|
SCODOC_URL + "/ScoDoc/api/tokens", auth=(SCODOC_USER, SCODOC_PASSWORD)
|
2022-04-13 12:39:10 +02:00
|
|
|
|
)
|
2022-03-04 17:16:08 +01:00
|
|
|
|
token = r0.json()["token"]
|
|
|
|
|
HEADERS = {"Authorization": f"Bearer {token}"}
|
|
|
|
|
|
2022-03-02 16:45:47 +01:00
|
|
|
|
|
|
|
|
|
DEPT = None
|
|
|
|
|
FORMSEMESTRE = None
|
|
|
|
|
ETU = None
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@bp.route("/test_dept", methods=["GET"])
|
|
|
|
|
def get_departement():
|
|
|
|
|
"""
|
2022-03-03 16:25:29 +01:00
|
|
|
|
Permet de tester departements() mais également de set un département dans DEPT pour la suite des tests
|
2022-03-02 16:45:47 +01:00
|
|
|
|
"""
|
2022-03-04 17:16:08 +01:00
|
|
|
|
|
|
|
|
|
get_token()
|
|
|
|
|
|
|
|
|
|
global HEADERS
|
2022-03-09 16:52:07 +01:00
|
|
|
|
global CHECK_CERTIFICATE
|
|
|
|
|
global SCODOC_USER
|
|
|
|
|
global SCODOC_PASSWORD
|
2022-03-04 17:16:08 +01:00
|
|
|
|
|
2022-03-09 16:52:07 +01:00
|
|
|
|
# print(HEADERS)
|
2022-03-03 16:25:29 +01:00
|
|
|
|
# departements
|
2022-03-02 16:45:47 +01:00
|
|
|
|
r = requests.get(
|
|
|
|
|
SCODOC_URL + "/ScoDoc/api/departements",
|
2022-04-13 12:39:10 +02:00
|
|
|
|
headers=HEADERS,
|
|
|
|
|
verify=CHECK_CERTIFICATE,
|
2022-03-02 16:45:47 +01:00
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
if r.status_code == 200:
|
|
|
|
|
dept_id = r.json()[0]
|
|
|
|
|
# print(dept_id)
|
|
|
|
|
|
|
|
|
|
dept = models.Departement.query.filter_by(id=dept_id).first()
|
|
|
|
|
dept = dept.to_dict()
|
|
|
|
|
|
|
|
|
|
fields = ["id", "acronym", "description", "visible", "date_creation"]
|
|
|
|
|
|
|
|
|
|
for field in dept:
|
|
|
|
|
if field not in fields:
|
|
|
|
|
return error_response(501, field + " field missing")
|
|
|
|
|
|
|
|
|
|
global DEPT
|
|
|
|
|
DEPT = dept
|
|
|
|
|
|
|
|
|
|
return error_response(200, "OK")
|
|
|
|
|
|
|
|
|
|
return error_response(409, "La requête ne peut être traitée en l’état actuel")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@bp.route("/test_formsemestre", methods=["GET"])
|
|
|
|
|
def get_formsemestre():
|
|
|
|
|
"""
|
2022-03-03 16:25:29 +01:00
|
|
|
|
Permet de tester liste_semestres_courant() mais également de set un formsemestre dans FORMSEMESTRE
|
|
|
|
|
pour la suite des tests
|
2022-03-02 16:45:47 +01:00
|
|
|
|
"""
|
2022-03-03 16:25:29 +01:00
|
|
|
|
get_departement()
|
2022-03-02 16:45:47 +01:00
|
|
|
|
|
|
|
|
|
global DEPT
|
|
|
|
|
dept_acronym = DEPT["acronym"]
|
|
|
|
|
|
2022-03-03 16:25:29 +01:00
|
|
|
|
# liste_semestres_courant
|
2022-03-02 16:45:47 +01:00
|
|
|
|
r = requests.get(
|
2022-03-03 16:25:29 +01:00
|
|
|
|
SCODOC_URL + "/ScoDoc/api/departements/" + dept_acronym + "/semestres_courants",
|
2022-04-13 12:39:10 +02:00
|
|
|
|
auth=(SCODOC_USER, SCODOC_PASSWORD),
|
2022-03-02 16:45:47 +01:00
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
if r.status_code == 200:
|
|
|
|
|
formsemestre = r.json()[0]
|
2022-03-03 16:25:29 +01:00
|
|
|
|
print(r.json()[0])
|
2022-03-02 16:45:47 +01:00
|
|
|
|
|
2022-04-13 12:39:10 +02:00
|
|
|
|
fields = [
|
|
|
|
|
"gestion_semestrielle",
|
|
|
|
|
"titre",
|
|
|
|
|
"scodoc7_id",
|
|
|
|
|
"date_debut",
|
|
|
|
|
"bul_bgcolor",
|
|
|
|
|
"date_fin",
|
|
|
|
|
"resp_can_edit",
|
|
|
|
|
"dept_id",
|
|
|
|
|
"etat",
|
|
|
|
|
"resp_can_change_ens",
|
|
|
|
|
"id",
|
|
|
|
|
"modalite",
|
|
|
|
|
"ens_can_edit_eval",
|
|
|
|
|
"formation_id",
|
|
|
|
|
"gestion_compensation",
|
|
|
|
|
"elt_sem_apo",
|
|
|
|
|
"semestre_id",
|
|
|
|
|
"bul_hide_xml",
|
|
|
|
|
"elt_annee_apo",
|
|
|
|
|
"block_moyennes",
|
|
|
|
|
"formsemestre_id",
|
|
|
|
|
"titre_num",
|
|
|
|
|
"date_debut_iso",
|
|
|
|
|
"date_fin_iso",
|
|
|
|
|
"responsables",
|
|
|
|
|
]
|
2022-03-02 16:45:47 +01:00
|
|
|
|
|
|
|
|
|
for field in formsemestre:
|
|
|
|
|
if field not in fields:
|
|
|
|
|
return error_response(501, field + " field missing")
|
|
|
|
|
|
|
|
|
|
global FORMSEMESTRE
|
|
|
|
|
FORMSEMESTRE = formsemestre
|
|
|
|
|
|
|
|
|
|
return error_response(200, "OK")
|
|
|
|
|
|
|
|
|
|
return error_response(409, "La requête ne peut être traitée en l’état actuel")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@bp.route("/test_etu", methods=["GET"])
|
|
|
|
|
def get_etudiant():
|
|
|
|
|
"""
|
2022-03-03 16:25:29 +01:00
|
|
|
|
Permet de tester etudiants() mais également de set un etudiant dans ETU pour la suite des tests
|
2022-03-02 16:45:47 +01:00
|
|
|
|
"""
|
|
|
|
|
|
2022-03-03 16:25:29 +01:00
|
|
|
|
# etudiants
|
2022-03-02 16:45:47 +01:00
|
|
|
|
r = requests.get(
|
2022-03-03 16:25:29 +01:00
|
|
|
|
SCODOC_URL + "/ScoDoc/api/etudiants/courant",
|
2022-04-13 12:39:10 +02:00
|
|
|
|
auth=(SCODOC_USER, SCODOC_PASSWORD),
|
2022-03-02 16:45:47 +01:00
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
if r.status_code == 200:
|
|
|
|
|
etu = r.json()[0]
|
|
|
|
|
|
2022-04-13 12:39:10 +02:00
|
|
|
|
fields = [
|
|
|
|
|
"civilite",
|
|
|
|
|
"code_ine",
|
|
|
|
|
"code_nip",
|
|
|
|
|
"date_naissance",
|
|
|
|
|
"email",
|
|
|
|
|
"emailperso",
|
|
|
|
|
"etudid",
|
|
|
|
|
"nom",
|
|
|
|
|
"prenom",
|
|
|
|
|
]
|
2022-03-02 16:45:47 +01:00
|
|
|
|
|
|
|
|
|
for field in etu:
|
|
|
|
|
if field not in fields:
|
|
|
|
|
return error_response(501, field + " field missing")
|
|
|
|
|
|
|
|
|
|
global ETU
|
|
|
|
|
ETU = etu
|
|
|
|
|
print(etu)
|
|
|
|
|
|
|
|
|
|
return error_response(200, "OK")
|
|
|
|
|
|
|
|
|
|
return error_response(409, "La requête ne peut être traitée en l’état actuel")
|
|
|
|
|
|
|
|
|
|
|
2022-03-03 16:25:29 +01:00
|
|
|
|
############################################### Departements ##########################################################
|
2022-03-02 16:45:47 +01:00
|
|
|
|
|
|
|
|
|
|
2022-03-03 16:25:29 +01:00
|
|
|
|
@bp.route("/test_liste_etudiants")
|
|
|
|
|
def test_departements_liste_etudiants():
|
2022-03-02 16:45:47 +01:00
|
|
|
|
"""
|
2022-03-03 16:25:29 +01:00
|
|
|
|
Test la route liste_etudiants
|
2022-03-02 16:45:47 +01:00
|
|
|
|
"""
|
2022-03-03 16:25:29 +01:00
|
|
|
|
# Set un département et un formsemestre pour les tests
|
|
|
|
|
get_departement()
|
|
|
|
|
get_formsemestre()
|
|
|
|
|
|
|
|
|
|
global DEPT
|
|
|
|
|
global FORMSEMESTRE
|
|
|
|
|
|
|
|
|
|
# Set les fields à vérifier
|
2022-04-13 12:39:10 +02:00
|
|
|
|
fields = [
|
|
|
|
|
"civilite",
|
|
|
|
|
"code_ine",
|
|
|
|
|
"code_nip",
|
|
|
|
|
"date_naissance",
|
|
|
|
|
"email",
|
|
|
|
|
"emailperso",
|
|
|
|
|
"etudid",
|
|
|
|
|
"nom",
|
|
|
|
|
"prenom",
|
|
|
|
|
]
|
2022-03-03 16:25:29 +01:00
|
|
|
|
|
|
|
|
|
# liste_etudiants (sans formsemestre)
|
2022-03-02 16:45:47 +01:00
|
|
|
|
r1 = requests.get(
|
2022-03-03 16:25:29 +01:00
|
|
|
|
SCODOC_URL + "/ScoDoc/api/departements/" + DEPT["acronym"] + "/etudiants/liste",
|
2022-04-13 12:39:10 +02:00
|
|
|
|
auth=(SCODOC_USER, SCODOC_PASSWORD),
|
|
|
|
|
)
|
2022-03-02 16:45:47 +01:00
|
|
|
|
|
2022-04-13 12:39:10 +02:00
|
|
|
|
if r1.status_code == 200: # Si la requête est "OK"
|
2022-03-03 16:25:29 +01:00
|
|
|
|
# On récupère la liste des étudiants
|
|
|
|
|
etudiants = r1.json()
|
2022-03-02 16:45:47 +01:00
|
|
|
|
|
2022-03-03 16:25:29 +01:00
|
|
|
|
# Vérification que tous les étudiants ont bien tous les bons champs
|
|
|
|
|
for etu in etudiants:
|
|
|
|
|
for field in etu:
|
|
|
|
|
if field not in fields:
|
|
|
|
|
return error_response(501, field + " field missing")
|
|
|
|
|
|
|
|
|
|
# liste_etudiants (avec formsemestre)
|
|
|
|
|
r2 = requests.get(
|
2022-04-13 12:39:10 +02:00
|
|
|
|
SCODOC_URL
|
|
|
|
|
+ "/ScoDoc/api/departements/"
|
|
|
|
|
+ DEPT["acronym"]
|
|
|
|
|
+ "/etudiants/liste/"
|
|
|
|
|
+ str(FORMSEMESTRE["formsemestre_id"]),
|
|
|
|
|
auth=(SCODOC_USER, SCODOC_PASSWORD),
|
2022-03-03 16:25:29 +01:00
|
|
|
|
)
|
|
|
|
|
|
2022-04-13 12:39:10 +02:00
|
|
|
|
if r2.status_code == 200: # Si la requête est "OK"
|
2022-03-03 16:25:29 +01:00
|
|
|
|
# On récupère la liste des étudiants
|
|
|
|
|
etudiants = r2.json()
|
|
|
|
|
|
|
|
|
|
# Vérification que tous les étudiants ont bien tous les bons champs
|
|
|
|
|
for etu in etudiants:
|
|
|
|
|
for field in etu:
|
|
|
|
|
if field not in fields:
|
|
|
|
|
return error_response(501, field + " field missing")
|
|
|
|
|
|
|
|
|
|
return error_response(200, "OK")
|
|
|
|
|
|
|
|
|
|
return error_response(409, "La requête ne peut être traitée en l’état actuel")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@bp.route("/test_referenciel_competences")
|
|
|
|
|
def test_departements_referenciel_competences():
|
|
|
|
|
"""
|
|
|
|
|
Test la route referenciel_competences
|
|
|
|
|
"""
|
|
|
|
|
get_departement()
|
|
|
|
|
get_formsemestre()
|
|
|
|
|
|
|
|
|
|
global DEPT
|
|
|
|
|
global FORMSEMESTRE
|
2022-03-02 16:45:47 +01:00
|
|
|
|
|
|
|
|
|
# referenciel_competences
|
2022-03-03 16:25:29 +01:00
|
|
|
|
r = requests.post(
|
2022-04-13 12:39:10 +02:00
|
|
|
|
SCODOC_URL
|
|
|
|
|
+ "/ScoDoc/api/departements/"
|
|
|
|
|
+ DEPT["acronym"]
|
|
|
|
|
+ "/formations/"
|
|
|
|
|
+ FORMSEMESTRE["formation_id"]
|
|
|
|
|
+ "/referentiel_competences",
|
|
|
|
|
auth=(SCODOC_USER, SCODOC_PASSWORD),
|
|
|
|
|
)
|
2022-03-02 16:45:47 +01:00
|
|
|
|
|
2022-03-03 16:25:29 +01:00
|
|
|
|
|
|
|
|
|
@bp.route("/test_liste_semestre_index")
|
|
|
|
|
def test_departements_semestre_index():
|
|
|
|
|
"""
|
|
|
|
|
Test la route semestre_index
|
|
|
|
|
"""
|
2022-03-02 16:45:47 +01:00
|
|
|
|
# semestre_index
|
|
|
|
|
r5 = requests.post(
|
2022-04-13 12:39:10 +02:00
|
|
|
|
SCODOC_URL
|
|
|
|
|
+ "/ScoDoc/api/departements/"
|
|
|
|
|
+ DEPT["acronym"]
|
|
|
|
|
+ "/formsemestre/"
|
|
|
|
|
+ FORMSEMESTRE["formation_id"]
|
|
|
|
|
+ "/programme",
|
|
|
|
|
auth=(SCODOC_USER, SCODOC_PASSWORD),
|
|
|
|
|
)
|
2022-03-02 16:45:47 +01:00
|
|
|
|
|
|
|
|
|
|
2022-03-03 16:25:29 +01:00
|
|
|
|
#################################################### Etudiants ########################################################
|
|
|
|
|
|
2022-04-13 12:39:10 +02:00
|
|
|
|
|
2022-03-02 16:45:47 +01:00
|
|
|
|
def test_routes_etudiants():
|
|
|
|
|
"""
|
|
|
|
|
Test les routes de la partie Etudiants
|
|
|
|
|
"""
|
|
|
|
|
# etudiants
|
|
|
|
|
r1 = requests.get(
|
2022-04-13 12:39:10 +02:00
|
|
|
|
SCODOC_URL + "/ScoDoc/api/etudiants", auth=(SCODOC_USER, SCODOC_PASSWORD)
|
|
|
|
|
)
|
2022-03-02 16:45:47 +01:00
|
|
|
|
|
|
|
|
|
# etudiants_courant
|
2022-04-13 12:39:10 +02:00
|
|
|
|
r2 = requests.post(SCODOC_URL + "/ScoDoc/api", auth=(SCODOC_USER, SCODOC_PASSWORD))
|
2022-03-02 16:45:47 +01:00
|
|
|
|
|
|
|
|
|
# etudiant
|
2022-04-13 12:39:10 +02:00
|
|
|
|
r3 = requests.post(SCODOC_URL + "/ScoDoc/api", auth=(SCODOC_USER, SCODOC_PASSWORD))
|
2022-03-02 16:45:47 +01:00
|
|
|
|
|
|
|
|
|
# etudiant_formsemestres
|
2022-04-13 12:39:10 +02:00
|
|
|
|
r4 = requests.post(SCODOC_URL + "/ScoDoc/api", auth=(SCODOC_USER, SCODOC_PASSWORD))
|
2022-03-02 16:45:47 +01:00
|
|
|
|
|
|
|
|
|
# etudiant_bulletin_semestre
|
2022-04-13 12:39:10 +02:00
|
|
|
|
r5 = requests.post(SCODOC_URL + "/ScoDoc/api", auth=(SCODOC_USER, SCODOC_PASSWORD))
|
2022-03-02 16:45:47 +01:00
|
|
|
|
|
|
|
|
|
# etudiant_groups
|
2022-04-13 12:39:10 +02:00
|
|
|
|
r6 = requests.post(SCODOC_URL + "/ScoDoc/api", auth=(SCODOC_USER, SCODOC_PASSWORD))
|
2022-03-02 16:45:47 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_routes_formation():
|
|
|
|
|
"""
|
|
|
|
|
Test les routes de la partie Formation
|
|
|
|
|
"""
|
|
|
|
|
# formations
|
2022-04-13 12:39:10 +02:00
|
|
|
|
r1 = requests.post(SCODOC_URL + "/ScoDoc/api", auth=(SCODOC_USER, SCODOC_PASSWORD))
|
2022-03-02 16:45:47 +01:00
|
|
|
|
|
|
|
|
|
# formations_by_id
|
2022-04-13 12:39:10 +02:00
|
|
|
|
r2 = requests.post(SCODOC_URL + "/ScoDoc/api", auth=(SCODOC_USER, SCODOC_PASSWORD))
|
2022-03-02 16:45:47 +01:00
|
|
|
|
|
|
|
|
|
# formation_export_by_formation_id
|
2022-04-13 12:39:10 +02:00
|
|
|
|
r3 = requests.post(SCODOC_URL + "/ScoDoc/api", auth=(SCODOC_USER, SCODOC_PASSWORD))
|
2022-03-02 16:45:47 +01:00
|
|
|
|
|
|
|
|
|
# formsemestre_apo
|
2022-04-13 12:39:10 +02:00
|
|
|
|
r4 = requests.post(SCODOC_URL + "/ScoDoc/api", auth=(SCODOC_USER, SCODOC_PASSWORD))
|
2022-03-02 16:45:47 +01:00
|
|
|
|
|
|
|
|
|
# moduleimpls
|
2022-04-13 12:39:10 +02:00
|
|
|
|
r5 = requests.post(SCODOC_URL + "/ScoDoc/api", auth=(SCODOC_USER, SCODOC_PASSWORD))
|
2022-03-02 16:45:47 +01:00
|
|
|
|
|
|
|
|
|
# moduleimpls_sem
|
2022-04-13 12:39:10 +02:00
|
|
|
|
r6 = requests.post(SCODOC_URL + "/ScoDoc/api", auth=(SCODOC_USER, SCODOC_PASSWORD))
|
2022-03-02 16:45:47 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_routes_formsemestres():
|
|
|
|
|
"""
|
|
|
|
|
Test les routes de la partie Formsemestres
|
|
|
|
|
"""
|
|
|
|
|
# formsemestre
|
2022-04-13 12:39:10 +02:00
|
|
|
|
r1 = requests.post(SCODOC_URL + "/ScoDoc/api", auth=(SCODOC_USER, SCODOC_PASSWORD))
|
2022-03-02 16:45:47 +01:00
|
|
|
|
|
|
|
|
|
# etudiant_bulletin
|
2022-04-13 12:39:10 +02:00
|
|
|
|
r2 = requests.post(SCODOC_URL + "/ScoDoc/api", auth=(SCODOC_USER, SCODOC_PASSWORD))
|
2022-03-02 16:45:47 +01:00
|
|
|
|
|
|
|
|
|
# bulletins
|
2022-04-13 12:39:10 +02:00
|
|
|
|
r3 = requests.post(SCODOC_URL + "/ScoDoc/api", auth=(SCODOC_USER, SCODOC_PASSWORD))
|
2022-03-02 16:45:47 +01:00
|
|
|
|
|
|
|
|
|
# jury
|
2022-04-13 12:39:10 +02:00
|
|
|
|
r4 = requests.post(SCODOC_URL + "/ScoDoc/api", auth=(SCODOC_USER, SCODOC_PASSWORD))
|
2022-03-02 16:45:47 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_routes_partitions():
|
|
|
|
|
"""
|
|
|
|
|
Test les routes de la partie Partitions
|
|
|
|
|
"""
|
|
|
|
|
# partition
|
2022-04-13 12:39:10 +02:00
|
|
|
|
r1 = requests.post(SCODOC_URL + "/ScoDoc/api", auth=(SCODOC_USER, SCODOC_PASSWORD))
|
2022-03-02 16:45:47 +01:00
|
|
|
|
|
|
|
|
|
# etud_in_group
|
2022-04-13 12:39:10 +02:00
|
|
|
|
r2 = requests.post(SCODOC_URL + "/ScoDoc/api", auth=(SCODOC_USER, SCODOC_PASSWORD))
|
2022-03-02 16:45:47 +01:00
|
|
|
|
|
|
|
|
|
# set_groups
|
2022-04-13 12:39:10 +02:00
|
|
|
|
r3 = requests.post(SCODOC_URL + "/ScoDoc/api", auth=(SCODOC_USER, SCODOC_PASSWORD))
|
2022-03-02 16:45:47 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_routes_evaluations():
|
|
|
|
|
"""
|
|
|
|
|
Test les routes de la partie Evaluations
|
|
|
|
|
"""
|
|
|
|
|
# evaluations
|
2022-04-13 12:39:10 +02:00
|
|
|
|
r1 = requests.post(SCODOC_URL + "/ScoDoc/api", auth=(SCODOC_USER, SCODOC_PASSWORD))
|
2022-03-02 16:45:47 +01:00
|
|
|
|
|
|
|
|
|
# evaluation_notes
|
2022-04-13 12:39:10 +02:00
|
|
|
|
r2 = requests.post(SCODOC_URL + "/ScoDoc/api", auth=(SCODOC_USER, SCODOC_PASSWORD))
|
2022-03-02 16:45:47 +01:00
|
|
|
|
|
|
|
|
|
# evaluation_set_notes
|
2022-04-13 12:39:10 +02:00
|
|
|
|
r3 = requests.post(SCODOC_URL + "/ScoDoc/api", auth=(SCODOC_USER, SCODOC_PASSWORD))
|
2022-03-02 16:45:47 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_routes_jury():
|
|
|
|
|
"""
|
|
|
|
|
Test les routes de la partie Jury
|
|
|
|
|
"""
|
|
|
|
|
# jury_preparation
|
2022-04-13 12:39:10 +02:00
|
|
|
|
r1 = requests.post(SCODOC_URL + "/ScoDoc/api", auth=(SCODOC_USER, SCODOC_PASSWORD))
|
2022-03-02 16:45:47 +01:00
|
|
|
|
|
|
|
|
|
# jury_decisions
|
2022-04-13 12:39:10 +02:00
|
|
|
|
r2 = requests.post(SCODOC_URL + "/ScoDoc/api", auth=(SCODOC_USER, SCODOC_PASSWORD))
|
2022-03-02 16:45:47 +01:00
|
|
|
|
|
|
|
|
|
# set_decision_jury
|
2022-04-13 12:39:10 +02:00
|
|
|
|
r3 = requests.post(SCODOC_URL + "/ScoDoc/api", auth=(SCODOC_USER, SCODOC_PASSWORD))
|
2022-03-02 16:45:47 +01:00
|
|
|
|
|
|
|
|
|
# annule_decision_jury
|
2022-04-13 12:39:10 +02:00
|
|
|
|
r4 = requests.post(SCODOC_URL + "/ScoDoc/api", auth=(SCODOC_USER, SCODOC_PASSWORD))
|
2022-03-02 16:45:47 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_routes_absences():
|
|
|
|
|
"""
|
|
|
|
|
Test les routes de la partie Absences
|
|
|
|
|
"""
|
|
|
|
|
# absences
|
2022-04-13 12:39:10 +02:00
|
|
|
|
r1 = requests.post(SCODOC_URL + "/ScoDoc/api", auth=(SCODOC_USER, SCODOC_PASSWORD))
|
2022-03-02 16:45:47 +01:00
|
|
|
|
|
|
|
|
|
# absences_justify
|
2022-04-13 12:39:10 +02:00
|
|
|
|
r2 = requests.post(SCODOC_URL + "/ScoDoc/api", auth=(SCODOC_USER, SCODOC_PASSWORD))
|
2022-03-02 16:45:47 +01:00
|
|
|
|
|
|
|
|
|
# abs_signale
|
2022-04-13 12:39:10 +02:00
|
|
|
|
r3 = requests.post(SCODOC_URL + "/ScoDoc/api", auth=(SCODOC_USER, SCODOC_PASSWORD))
|
2022-03-02 16:45:47 +01:00
|
|
|
|
|
|
|
|
|
# abs_annule
|
2022-04-13 12:39:10 +02:00
|
|
|
|
r4 = requests.post(SCODOC_URL + "/ScoDoc/api", auth=(SCODOC_USER, SCODOC_PASSWORD))
|
2022-03-02 16:45:47 +01:00
|
|
|
|
|
|
|
|
|
# abs_annule_justif
|
2022-04-13 12:39:10 +02:00
|
|
|
|
r5 = requests.post(SCODOC_URL + "/ScoDoc/api", auth=(SCODOC_USER, SCODOC_PASSWORD))
|
2022-03-02 16:45:47 +01:00
|
|
|
|
|
|
|
|
|
# abs_groupe_etat
|
2022-04-13 12:39:10 +02:00
|
|
|
|
r6 = requests.post(SCODOC_URL + "/ScoDoc/api", auth=(SCODOC_USER, SCODOC_PASSWORD))
|
2022-03-02 16:45:47 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_routes_logos():
|
|
|
|
|
"""
|
|
|
|
|
Test les routes de la partie Logos
|
|
|
|
|
"""
|
|
|
|
|
# liste_logos
|
2022-04-13 12:39:10 +02:00
|
|
|
|
r1 = requests.post(SCODOC_URL + "/ScoDoc/api", auth=(SCODOC_USER, SCODOC_PASSWORD))
|
2022-03-02 16:45:47 +01:00
|
|
|
|
|
|
|
|
|
# recup_logo_global
|
2022-04-13 12:39:10 +02:00
|
|
|
|
r2 = requests.post(SCODOC_URL + "/ScoDoc/api", auth=(SCODOC_USER, SCODOC_PASSWORD))
|
2022-03-02 16:45:47 +01:00
|
|
|
|
|
|
|
|
|
# logo_dept
|
2022-04-13 12:39:10 +02:00
|
|
|
|
r3 = requests.post(SCODOC_URL + "/ScoDoc/api", auth=(SCODOC_USER, SCODOC_PASSWORD))
|
2022-03-02 16:45:47 +01:00
|
|
|
|
|
|
|
|
|
# recup_logo_dept_global
|
2022-04-13 12:39:10 +02:00
|
|
|
|
r4 = requests.post(SCODOC_URL + "/ScoDoc/api", auth=(SCODOC_USER, SCODOC_PASSWORD))
|