Fixes for unit tests

This commit is contained in:
Emmanuel Viennet 2024-07-27 14:34:20 +02:00
parent 75c10a4917
commit 64038687b7
3 changed files with 27 additions and 10 deletions

View File

@ -65,8 +65,8 @@ def test_formsemestre_partition(api_headers):
headers = api_headers headers = api_headers
formsemestre_id = 1 formsemestre_id = 1
partitions = GET(f"/formsemestre/{formsemestre_id}/partitions", headers=headers) partitions = GET(f"/formsemestre/{formsemestre_id}/partitions", headers=headers)
# au départ, pas de partitions # au départ, une partition (TD avec groupes A et B)
assert partitions == {} assert len(partitions) == 1
# --- Création partition # --- Création partition
partition_d = { partition_d = {
"partition_name": "T&Dé", "partition_name": "T&Dé",

View File

@ -1,5 +1,6 @@
import pytest import pytest
import flask
from flask import g from flask import g
from flask_login import login_user from flask_login import login_user

View File

@ -50,8 +50,9 @@
"moy_sae_14_3": "17.83", "moy_sae_14_3": "17.83",
"moy_sae_15_3": "~", "moy_sae_15_3": "~",
"ues_validables": "3/3", "ues_validables": "3/3",
"nbabs": 0, "nbabs": 1,
"nbabsjust": 0, "nbabsjust": 0,
"part_2": "",
"code_cursus": "S1", "code_cursus": "S1",
"bac": "", "bac": "",
"specialite": "", "specialite": "",
@ -109,8 +110,9 @@
"moy_sae_14_3": "10.74", "moy_sae_14_3": "10.74",
"moy_sae_15_3": "~", "moy_sae_15_3": "~",
"ues_validables": "3/3", "ues_validables": "3/3",
"nbabs": 2, "nbabs": 0,
"nbabsjust": 0, "nbabsjust": 0,
"part_2": "",
"code_cursus": "S1", "code_cursus": "S1",
"bac": "", "bac": "",
"specialite": "", "specialite": "",
@ -170,6 +172,7 @@
"ues_validables": "2/3", "ues_validables": "2/3",
"nbabs": 0, "nbabs": 0,
"nbabsjust": 0, "nbabsjust": 0,
"part_2": "",
"code_cursus": "S1", "code_cursus": "S1",
"bac": "", "bac": "",
"specialite": "", "specialite": "",
@ -229,6 +232,7 @@
"ues_validables": "2/3", "ues_validables": "2/3",
"nbabs": 0, "nbabs": 0,
"nbabsjust": 0, "nbabsjust": 0,
"part_2": "",
"code_cursus": "S1", "code_cursus": "S1",
"bac": "", "bac": "",
"specialite": "", "specialite": "",
@ -286,8 +290,9 @@
"moy_sae_14_3": "11.09", "moy_sae_14_3": "11.09",
"moy_sae_15_3": "~", "moy_sae_15_3": "~",
"ues_validables": "1/3", "ues_validables": "1/3",
"nbabs": 3, "nbabs": 0,
"nbabsjust": 0, "nbabsjust": 0,
"part_2": "",
"code_cursus": "S1", "code_cursus": "S1",
"bac": "", "bac": "",
"specialite": "", "specialite": "",
@ -347,6 +352,7 @@
"ues_validables": "2/3", "ues_validables": "2/3",
"nbabs": 0, "nbabs": 0,
"nbabsjust": 0, "nbabsjust": 0,
"part_2": "",
"code_cursus": "S1", "code_cursus": "S1",
"bac": "", "bac": "",
"specialite": "", "specialite": "",
@ -404,8 +410,9 @@
"moy_sae_14_3": "05.17", "moy_sae_14_3": "05.17",
"moy_sae_15_3": "~", "moy_sae_15_3": "~",
"ues_validables": "1/3", "ues_validables": "1/3",
"nbabs": 3, "nbabs": 0,
"nbabsjust": 0, "nbabsjust": 0,
"part_2": "",
"code_cursus": "S1", "code_cursus": "S1",
"bac": "", "bac": "",
"specialite": "", "specialite": "",
@ -465,6 +472,7 @@
"ues_validables": "0/3", "ues_validables": "0/3",
"nbabs": 0, "nbabs": 0,
"nbabsjust": 0, "nbabsjust": 0,
"part_2": "",
"code_cursus": "S1", "code_cursus": "S1",
"bac": "", "bac": "",
"specialite": "", "specialite": "",
@ -524,6 +532,7 @@
"ues_validables": "0/3", "ues_validables": "0/3",
"nbabs": 0, "nbabs": 0,
"nbabsjust": 0, "nbabsjust": 0,
"part_2": "",
"code_cursus": "S1", "code_cursus": "S1",
"bac": "", "bac": "",
"specialite": "", "specialite": "",
@ -583,6 +592,7 @@
"ues_validables": "0/3", "ues_validables": "0/3",
"nbabs": 0, "nbabs": 0,
"nbabsjust": 0, "nbabsjust": 0,
"part_2": "",
"code_cursus": "S1", "code_cursus": "S1",
"bac": "", "bac": "",
"specialite": "", "specialite": "",
@ -642,6 +652,7 @@
"ues_validables": "", "ues_validables": "",
"nbabs": 2, "nbabs": 2,
"nbabsjust": 0, "nbabsjust": 0,
"part_2": "D\u00e9f.",
"code_cursus": "S1", "code_cursus": "S1",
"bac": "", "bac": "",
"specialite": "", "specialite": "",
@ -699,8 +710,9 @@
"moy_sae_14_3": "", "moy_sae_14_3": "",
"moy_sae_15_3": "", "moy_sae_15_3": "",
"ues_validables": "", "ues_validables": "",
"nbabs": 2, "nbabs": 0,
"nbabsjust": 0, "nbabsjust": 0,
"part_2": "D\u00e9m.",
"code_cursus": "S1", "code_cursus": "S1",
"bac": "", "bac": "",
"specialite": "", "specialite": "",
@ -758,8 +770,9 @@
"moy_sae_14_3": "", "moy_sae_14_3": "",
"moy_sae_15_3": "", "moy_sae_15_3": "",
"ues_validables": "", "ues_validables": "",
"nbabs": 0, "nbabs": 2,
"nbabsjust": 0, "nbabsjust": 0,
"part_2": "D\u00e9f.",
"code_cursus": "S1", "code_cursus": "S1",
"bac": "", "bac": "",
"specialite": "", "specialite": "",
@ -817,8 +830,9 @@
"moy_sae_14_3": "", "moy_sae_14_3": "",
"moy_sae_15_3": "", "moy_sae_15_3": "",
"ues_validables": "", "ues_validables": "",
"nbabs": 1, "nbabs": 0,
"nbabsjust": 0, "nbabsjust": 0,
"part_2": "D\u00e9m.",
"code_cursus": "S1", "code_cursus": "S1",
"bac": "", "bac": "",
"specialite": "", "specialite": "",
@ -878,6 +892,7 @@
"ues_validables": "", "ues_validables": "",
"nbabs": 0, "nbabs": 0,
"nbabsjust": 0, "nbabsjust": 0,
"part_2": "D\u00e9f.",
"code_cursus": "S1", "code_cursus": "S1",
"bac": "", "bac": "",
"specialite": "", "specialite": "",
@ -935,8 +950,9 @@
"moy_sae_14_3": "", "moy_sae_14_3": "",
"moy_sae_15_3": "", "moy_sae_15_3": "",
"ues_validables": "", "ues_validables": "",
"nbabs": 0, "nbabs": 1,
"nbabsjust": 0, "nbabsjust": 0,
"part_2": "D\u00e9m.",
"code_cursus": "S1", "code_cursus": "S1",
"bac": "", "bac": "",
"specialite": "", "specialite": "",