toulouse-maelis: mise à jour des test fonctionnels (#74187) #86

Merged
nroche merged 3 commits from wip/74187-parsifal-upgrade-functest into main 2023-02-06 16:32:49 +01:00
17 changed files with 285 additions and 55 deletions

View File

@ -456,7 +456,7 @@ def update_data(request, conn):
# create DUI if it is the first time the test is run
family_id = str(create_result['data']['number'])
print('\ncreate DUI: %s' % family_id)
elif 'E54a' in create_result['err']:
elif 'E54a' in create_result['err_desc']:
# else find DUI number in the error message
family_id = str(create_result['err_desc'][-7:-1])
print('\nre-use DUI: %s' % family_id)

View File

@ -167,7 +167,7 @@
"dateDeb": "2022-09-01T00:00:00+02:00",
"dateFin": "2023-07-01T00:00:00+02:00",
"description": "mischievous, rebellious, misunderstood, disruptive",
"code_text": "PAI M\u00e9dical"
"code_text": "PAI Alimentaire Int\u00e9gral"
},
"mother": "N/A",
"father": "N/A",
@ -200,7 +200,7 @@
"dateDeb": null,
"dateFin": null,
"description": null,
"code_text": "PAI Alimentaire"
"code_text": "PAI Alimentaire Partiel"
},
"mother": "N/A",
"father": "N/A",
@ -208,7 +208,7 @@
"subscribeSchoolList": [],
"subscribeActivityList": [],
"sexe_text": "F\u00e9minin",
"dietcode_text": "Panier"
"dietcode_text": "Panier PAI"
},
{
"num": "N/A",
@ -233,7 +233,7 @@
"dateDeb": null,
"dateFin": null,
"description": null,
"code_text": "PAI M\u00e9dical"
"code_text": "PAI Alimentaire Int\u00e9gral"
},
"mother": "N/A",
"father": "N/A",

View File

@ -8,8 +8,8 @@
{
"id": "MENU_PAI",
"code": "MENU_PAI",
"text": "Panier",
"libelle": "Panier"
"text": "Panier PAI",
"libelle": "Panier PAI"
},
{
"id": "MENU_SV",

View File

@ -1,20 +1,26 @@
[
{
"id": "PAI_02",
"code": "PAI_02",
"text": "PAI Alimentaire",
"libelle": "PAI Alimentaire"
},
{
"id": "PAI_01",
"code": "PAI_01",
"text": "PAI M\u00e9dical",
"libelle": "PAI M\u00e9dical"
"text": "PAI Alimentaire Int\u00e9gral",
"libelle": "PAI Alimentaire Int\u00e9gral"
},
{
"id": "PAI_02",
"code": "PAI_02",
"text": "PAI Alimentaire Partiel",
"libelle": "PAI Alimentaire Partiel"
},
{
"id": "PAI_04",
"code": "PAI_04",
"text": "PAI Alim + M\u00e9dical",
"libelle": "PAI Alim + M\u00e9dical"
},
{
"id": "PAI_03",
"code": "PAI_03",
"text": "PAI M\u00e9dical Alimentaire",
"libelle": "PAI M\u00e9dical Alimentaire"
"text": "PAI M\u00e9dical",
"libelle": "PAI M\u00e9dical"
}
]

View File

@ -6,8 +6,8 @@
"libelle": "Assist. maternelle/familiale"
},
{
"id": "25",
"code": "25",
"id": "AU",
"code": "AU",
"text": "Autre",
"libelle": "Autre"
},
@ -30,8 +30,8 @@
"libelle": "P\u00e8re"
},
{
"id": "10",
"code": "10",
"id": "TUTEUR",
"code": "TUTEUR",
"text": "Tuteur",
"libelle": "Tuteur"
},

View File

@ -35,6 +35,12 @@
"idStreet": "3713",
"libelleStreet": "ALL ANGELIQUE D HANNETAIRE"
},
{
"id": "3912",
"text": "ALL ANNE LAURE ARRUEBO",
"idStreet": "3912",
"libelleStreet": "ALL ANNE LAURE ARRUEBO"
},
{
"id": "3481",
"text": "ALL ANTOINE OSETE",
@ -83,6 +89,18 @@
"idStreet": "3779",
"libelleStreet": "ALL CLAIRE DE CASTELBAJAC"
},
{
"id": "3907",
"text": "ALL CLARA MALRAUX",
"idStreet": "3907",
"libelleStreet": "ALL CLARA MALRAUX"
},
{
"id": "3919",
"text": "ALL CLARISSA JEAN PHILIPPE",
"idStreet": "3919",
"libelleStreet": "ALL CLARISSA JEAN PHILIPPE"
},
{
"id": "3794",
"text": "ALL CLEMENCE ROYER",
@ -167,6 +185,12 @@
"idStreet": "3160",
"libelleStreet": "ALL DE LIMAYRAC"
},
{
"id": "3937",
"text": "ALL DE L OCTROI",
"idStreet": "3937",
"libelleStreet": "ALL DE L OCTROI"
},
{
"id": "3678",
"text": "ALL DE L U.S.A.T.",
@ -209,6 +233,12 @@
"idStreet": "2707",
"libelleStreet": "ALL DES FOULQUES"
},
{
"id": "3924",
"text": "ALL DES GABARES",
"idStreet": "3924",
"libelleStreet": "ALL DES GABARES"
},
{
"id": "1114",
"text": "ALL DES GRANDS CHENES",
@ -221,12 +251,30 @@
"idStreet": "3443",
"libelleStreet": "ALL DES JUSTES DES NATIONS"
},
{
"id": "3927",
"text": "ALL DES MOULINS DE LA GARONNE",
"idStreet": "3927",
"libelleStreet": "ALL DES MOULINS DE LA GARONNE"
},
{
"id": "3935",
"text": "ALL DES PECHEURS DE SABLE",
"idStreet": "3935",
"libelleStreet": "ALL DES PECHEURS DE SABLE"
},
{
"id": "1764",
"text": "ALL DES PINS",
"idStreet": "1764",
"libelleStreet": "ALL DES PINS"
},
{
"id": "3921",
"text": "ALL DES PROFESSEURS PONTONNIER",
"idStreet": "3921",
"libelleStreet": "ALL DES PROFESSEURS PONTONNIER"
},
{
"id": "3197",
"text": "ALL DES SCIENCES APPLIQUEES",
@ -6815,6 +6863,12 @@
"idStreet": "3793",
"libelleStreet": "JARDIN DES TOURELLES"
},
{
"id": "3913",
"text": "JARDIN DU TELEGRAPHE CLAUDE CHAPPE",
"idStreet": "3913",
"libelleStreet": "JARDIN DU TELEGRAPHE CLAUDE CHAPPE"
},
{
"id": "3209",
"text": "JARDIN FELIX TISSERAND",
@ -7751,6 +7805,12 @@
"idStreet": "2738",
"libelleStreet": "PL DES AMARYLLIS"
},
{
"id": "3929",
"text": "PL DES AMIDONNIERES",
"idStreet": "3929",
"libelleStreet": "PL DES AMIDONNIERES"
},
{
"id": "239",
"text": "PL DES AVIONS",
@ -7907,6 +7967,12 @@
"idStreet": "2664",
"libelleStreet": "PL DU CHANOINE PH RAVARY"
},
{
"id": "3909",
"text": "PL DU CONSEIL MUNICIPAL DES ENFANTS",
"idStreet": "3909",
"libelleStreet": "PL DU CONSEIL MUNICIPAL DES ENFANTS"
},
{
"id": "821",
"text": "PL DU DR JOSEPH BAYLAC",
@ -8033,6 +8099,12 @@
"idStreet": "3790",
"libelleStreet": "PL EDOUARD FILHOL"
},
{
"id": "3930",
"text": "PL ELIE CESTER",
"idStreet": "3930",
"libelleStreet": "PL ELIE CESTER"
},
{
"id": "3187",
"text": "PL EMILE BLOUIN",
@ -8159,6 +8231,12 @@
"idStreet": "2682",
"libelleStreet": "PL HUGUES PANASSIE"
},
{
"id": "3923",
"text": "PL IDIR",
"idStreet": "3923",
"libelleStreet": "PL IDIR"
},
{
"id": "2550",
"text": "PL INTERIEURE JEAN DOUJAT",
@ -8249,6 +8327,18 @@
"idStreet": "3365",
"libelleStreet": "PL JEANNINE MICHEAU"
},
{
"id": "3936",
"text": "PL JEAN PIERRE VERNANT",
"idStreet": "3936",
"libelleStreet": "PL JEAN PIERRE VERNANT"
},
{
"id": "3925",
"text": "PL JOB",
"idStreet": "3925",
"libelleStreet": "PL JOB"
},
{
"id": "3487",
"text": "PL JOHN MUNDY",
@ -8267,6 +8357,12 @@
"idStreet": "2196",
"libelleStreet": "PL JULES TELLIER"
},
{
"id": "3914",
"text": "PL JULIE JEANNE BOUILLANE",
"idStreet": "3914",
"libelleStreet": "PL JULIE JEANNE BOUILLANE"
},
{
"id": "3379",
"text": "PL JULIEN VERGNE",
@ -8507,6 +8603,12 @@
"idStreet": "3590",
"libelleStreet": "PL PIERRE POTIER"
},
{
"id": "3920",
"text": "PL PIERRE SATRE",
"idStreet": "3920",
"libelleStreet": "PL PIERRE SATRE"
},
{
"id": "1864",
"text": "PL RASPAIL",
@ -8993,6 +9095,12 @@
"idStreet": "3521",
"libelleStreet": "PRV JACQUES AURIAC"
},
{
"id": "3928",
"text": "PRV PIERRE BENECH",
"idStreet": "3928",
"libelleStreet": "PRV PIERRE BENECH"
},
{
"id": "3840",
"text": "PRV REMY PEYRANNE",
@ -9191,6 +9299,12 @@
"idStreet": "2855",
"libelleStreet": "RPT DE LA CRABE"
},
{
"id": "3934",
"text": "RPT DE LA MISSION ROSETTA",
"idStreet": "3934",
"libelleStreet": "RPT DE LA MISSION ROSETTA"
},
{
"id": "3761",
"text": "RPT DENISE PAU",
@ -9449,6 +9563,12 @@
"idStreet": "3691",
"libelleStreet": "RPT JEAN BEGUE"
},
{
"id": "3904",
"text": "RPT JEAN CLAUDE HUSSON",
"idStreet": "3904",
"libelleStreet": "RPT JEAN CLAUDE HUSSON"
},
{
"id": "3168",
"text": "RPT JEAN DAUVILLIER",
@ -9683,6 +9803,12 @@
"idStreet": "3511",
"libelleStreet": "RPT PIERRETTE ET ROGER ST-JEAN"
},
{
"id": "3922",
"text": "RPT RAFIK FILA",
"idStreet": "3922",
"libelleStreet": "RPT RAFIK FILA"
},
{
"id": "3718",
"text": "RPT RAYMONDE BORIOS",
@ -9707,6 +9833,18 @@
"idStreet": "3712",
"libelleStreet": "RPT SAINT LOUIS DE TOULOUSE"
},
{
"id": "3905",
"text": "RPT SIMONE IFF",
"idStreet": "3905",
"libelleStreet": "RPT SIMONE IFF"
},
{
"id": "3938",
"text": "RPT TORCATIS",
"idStreet": "3938",
"libelleStreet": "RPT TORCATIS"
},
{
"id": "3496",
"text": "RTE D901",
@ -10097,6 +10235,12 @@
"idStreet": "3408",
"libelleStreet": "RUE AMMAR BOUTALBA"
},
{
"id": "3908",
"text": "RUE AMPARO POCH Y GASCON",
"idStreet": "3908",
"libelleStreet": "RUE AMPARO POCH Y GASCON"
},
{
"id": "302",
"text": "RUE ANDRE BAUGE",
@ -10229,6 +10373,12 @@
"idStreet": "2525",
"libelleStreet": "RUE ANDRE VILLET"
},
{
"id": "3911",
"text": "RUE ANGELIQUE MARGUERITE LE BOURSIER DU",
"idStreet": "3911",
"libelleStreet": "RUE ANGELIQUE MARGUERITE LE BOURSIER DU "
},
{
"id": "3901",
"text": "RUE ANITA CONTI",
@ -10259,6 +10409,12 @@
"idStreet": "3674",
"libelleStreet": "RUE ANNE JOSEPHE THEROIGNE DE MERICOURT"
},
{
"id": "3906",
"text": "RUE ANNE LISTER",
"idStreet": "3906",
"libelleStreet": "RUE ANNE LISTER"
},
{
"id": "3630",
"text": "RUE ANNIE GIRARDOT",
@ -10655,6 +10811,12 @@
"idStreet": "284",
"libelleStreet": "RUE BARRY"
},
{
"id": "3915",
"text": "RUE BARTOLOME BENNASSAR",
"idStreet": "3915",
"libelleStreet": "RUE BARTOLOME BENNASSAR"
},
{
"id": "295",
"text": "RUE BASTIAT",
@ -15281,6 +15443,12 @@
"idStreet": "845",
"libelleStreet": "RUE DROUET"
},
{
"id": "3932",
"text": "RUE DU BACHAGA BOUALAM",
"idStreet": "3932",
"libelleStreet": "RUE DU BACHAGA BOUALAM"
},
{
"id": "309",
"text": "RUE DU BEARN",
@ -19013,6 +19181,12 @@
"idStreet": "1456",
"libelleStreet": "RUE JOSEPH MARIGNAC"
},
{
"id": "3917",
"text": "RUE JOSEPH ROQUES",
"idStreet": "3917",
"libelleStreet": "RUE JOSEPH ROQUES"
},
{
"id": "1980",
"text": "RUE JOSEPH SAGET",
@ -19403,6 +19577,12 @@
"idStreet": "2335",
"libelleStreet": "RUE LEONARD DE VINCI"
},
{
"id": "3933",
"text": "RUE LEON BOURJADE",
"idStreet": "3933",
"libelleStreet": "RUE LEON BOURJADE"
},
{
"id": "560",
"text": "RUE LEONCE CASTELBOU",
@ -20639,6 +20819,12 @@
"idStreet": "3043",
"libelleStreet": "RUE PARISOT DE LA VALETTE"
},
{
"id": "3939",
"text": "RUE PARSIFAL",
"idStreet": "3939",
"libelleStreet": "RUE PARSIFAL"
},
{
"id": "339",
"text": "RUE PAUL BELY",
@ -20753,6 +20939,12 @@
"idStreet": "3372",
"libelleStreet": "RUE PAUL ESTIVAL"
},
{
"id": "3926",
"text": "RUE PAULETTE LIBERMANN",
"idStreet": "3926",
"libelleStreet": "RUE PAULETTE LIBERMANN"
},
{
"id": "3147",
"text": "RUE PAULETTE PASTOR",
@ -21233,6 +21425,12 @@
"idStreet": "1813",
"libelleStreet": "RUE PRENDS Y GARDE"
},
{
"id": "3931",
"text": "RUE PROFESSEUR JACQUES ARLET",
"idStreet": "3931",
"libelleStreet": "RUE PROFESSEUR JACQUES ARLET"
},
{
"id": "1850",
"text": "RUE QUILMERY",
@ -21383,6 +21581,12 @@
"idStreet": "2462",
"libelleStreet": "RUE RENE CASSIN"
},
{
"id": "3910",
"text": "RUE RENE CORNEMENT",
"idStreet": "3910",
"libelleStreet": "RUE RENE CORNEMENT"
},
{
"id": "3723",
"text": "RUE RENE CORNEMONT",
@ -21701,6 +21905,12 @@
"idStreet": "1969",
"libelleStreet": "RUE ROZES DE BROUSSE"
},
{
"id": "3918",
"text": "RUE ROZSA PETER",
"idStreet": "3918",
"libelleStreet": "RUE ROZSA PETER"
},
{
"id": "1985",
"text": "RUE SAINT ANTOINE DU T",
@ -22589,6 +22799,12 @@
"idStreet": "2279",
"libelleStreet": "RUE VINCENT VAN GOGH"
},
{
"id": "3916",
"text": "RUE VIOLETTE SZABO",
"idStreet": "3916",
"libelleStreet": "RUE VIOLETTE SZABO"
},
{
"id": "2339",
"text": "RUE VIRGILE",

View File

@ -111,7 +111,7 @@
"dateDeb": "2022-09-01T00:00:00+02:00",
"dateFin": "2023-07-01T00:00:00+02:00",
"description": "mischievous, rebellious, misunderstood, disruptive",
"code_text": "PAI M\u00e9dical"
"code_text": "PAI Alimentaire Int\u00e9gral"
},
"mother": "N/A",
"father": "N/A",

View File

@ -3,5 +3,5 @@
"dateDeb": "1970-01-01T00:00:00+01:00",
"dateFin": "1970-01-01T00:00:00+01:00",
"description": null,
"code_text": "PAI M\u00e9dical Alimentaire"
"code_text": "PAI M\u00e9dical"
}

View File

@ -11,7 +11,7 @@
"sexe_text": "Masculin"
},
"personQuality": {
"code": "25",
"code": "AU",
"libelle": "Autre",
"code_text": "Autre"
}

View File

@ -9,5 +9,7 @@
"zipcode": null,
"town": null
},
"situation": null,
"weeklyHours": null,
"codeCSP_text": "RETRAITES"
}

View File

@ -86,6 +86,8 @@
"zipcode": "90701",
"town": "Springfield"
},
"situation": null,
"weeklyHours": null,
"codeCSP_text": "EMPLOYES"
},
"CAFInfo": {
@ -229,7 +231,7 @@
"dateDeb": "2022-09-01T00:00:00+02:00",
"dateFin": "2023-07-01T00:00:00+02:00",
"description": "mischievous, rebellious, misunderstood, disruptive",
"code_text": "PAI M\u00e9dical"
"code_text": "PAI Alimentaire Int\u00e9gral"
},
"mother": "N/A",
"father": "N/A",
@ -262,7 +264,7 @@
"dateDeb": null,
"dateFin": null,
"description": null,
"code_text": "PAI Alimentaire"
"code_text": "PAI Alimentaire Partiel"
},
"mother": "N/A",
"father": "N/A",
@ -295,7 +297,7 @@
"dateDeb": null,
"dateFin": null,
"description": null,
"code_text": "PAI Alimentaire"
"code_text": "PAI Alimentaire Partiel"
},
"mother": "N/A",
"father": "N/A",
@ -303,7 +305,7 @@
"subscribeSchoolList": [],
"subscribeActivityList": [],
"sexe_text": "F\u00e9minin",
"dietcode_text": "Panier"
"dietcode_text": "Panier PAI"
},
{
"num": "N/A",
@ -328,7 +330,7 @@
"dateDeb": null,
"dateFin": null,
"description": null,
"code_text": "PAI M\u00e9dical"
"code_text": "PAI Alimentaire Int\u00e9gral"
},
"mother": "N/A",
"father": "N/A",

View File

@ -11,7 +11,7 @@
"firstname": "MARGE",
"lastname": "N/A",
"maidenName": "BOUVIER",
"quality": "25",
"quality": "AU",
"civility": "MME",
"birth": {
"dateBirth": "1950-10-01T00:00:00+01:00",
@ -49,7 +49,7 @@
"firstname": "HOMER",
"lastname": "N/A",
"maidenName": null,
"quality": "25",
"quality": "AU",
"civility": "MR",
"birth": {
"dateBirth": "1956-05-12T00:00:00+01:00",
@ -86,6 +86,8 @@
"zipcode": null,
"town": null
},
"situation": null,
"weeklyHours": null,
"codeCSP_text": "RETRAITES"
},
"CAFInfo": {
@ -127,7 +129,7 @@
"sexe_text": "Masculin"
},
"personQuality": {
"code": "25",
"code": "AU",
"libelle": "Autre",
"code_text": "Autre"
}
@ -163,7 +165,7 @@
"dateDeb": "1970-01-01T00:00:00+01:00",
"dateFin": "1970-01-01T00:00:00+01:00",
"description": null,
"code_text": "PAI M\u00e9dical Alimentaire"
"code_text": "PAI M\u00e9dical"
},
"mother": "N/A",
"father": "N/A",
@ -195,7 +197,7 @@
"dateDeb": null,
"dateFin": null,
"description": null,
"code_text": "PAI Alimentaire"
"code_text": "PAI Alimentaire Partiel"
},
"mother": "N/A",
"father": "N/A",
@ -228,7 +230,7 @@
"dateDeb": null,
"dateFin": null,
"description": null,
"code_text": "PAI Alimentaire"
"code_text": "PAI Alimentaire Partiel"
},
"mother": "N/A",
"father": "N/A",
@ -236,7 +238,7 @@
"subscribeSchoolList": [],
"subscribeActivityList": [],
"sexe_text": "F\u00e9minin",
"dietcode_text": "Panier"
"dietcode_text": "Panier PAI"
},
{
"num": "N/A",
@ -261,7 +263,7 @@
"dateDeb": null,
"dateFin": null,
"description": null,
"code_text": "PAI M\u00e9dical"
"code_text": "PAI Alimentaire Int\u00e9gral"
},
"mother": "N/A",
"father": "N/A",
@ -280,7 +282,7 @@
"lastname": "RESET",
"dateBirth": "1970-01-01T00:00:00+01:00",
"sexe": "M",
"quality": "25",
"quality": "AU",
"contact": null,
"quality_text": "Autre",
"sexe_text": "Masculin"

View File

@ -23,7 +23,7 @@
"lastname": "RESET",
"dateBirth": "1970-01-01T00:00:00+01:00",
"sexe": "M",
"quality": "25",
"quality": "AU",
"contact": null,
"quality_text": "Autre",
"sexe_text": "Masculin"

View File

@ -3,7 +3,7 @@
"firstname": "MARGE",
"lastname": "N/A",
"maidenName": "BOUVIER",
"quality": "25",
"quality": "AU",
"civility": "MME",
"birth": {
"dateBirth": "1950-10-01T00:00:00+01:00",

View File

@ -3,7 +3,7 @@
"firstname": "HOMER",
"lastname": "N/A",
"maidenName": null,
"quality": "25",
"quality": "AU",
"civility": "MR",
"birth": {
"dateBirth": "1956-05-12T00:00:00+01:00",
@ -39,6 +39,8 @@
"zipcode": "90701",
"town": "Springfield"
},
"situation": null,
"weeklyHours": null,
"codeCSP_text": "EMPLOYES"
},
"CAFInfo": {

View File

@ -14,7 +14,7 @@ FAMILY_RESET_PAYLOAD = {
'firstname': 'Marge', # must be
'lastname': 'Simpson', # must be
'maidenName': 'reset', # no effect
'quality': '25',
'quality': 'AU',
'birth': {'dateBirth': '1950-10-01'}, # must be
'adresse': {'idStreet': '', 'street1': 'reset', 'town': 'reset', 'zipcode': 'reset'},
},
@ -22,7 +22,7 @@ FAMILY_RESET_PAYLOAD = {
'civility': 'MME', # no effect
'firstname': 'Homer', # must be
'lastname': 'Simpson', # must be
'quality': '25',
'quality': 'AU',
'birth': {'dateBirth': '1956-05-12'}, # must be
'adresse': {
'num': '42',
@ -125,7 +125,7 @@ FAMILY_RESET_PAYLOAD = {
},
},
'personQuality': {
'code': '25',
'code': 'AU',
},
},
],
@ -139,7 +139,7 @@ FAMILY_RESET_PAYLOAD = {
'lastname': 'reset', # ORA-01400: impossible d'insérer NULL dans ("MAELIS"."H_PERS"."ER_NOM")
'dateBirth': '1970-01-01',
'sexe': 'M',
'quality': '25',
'quality': 'AU',
'contact': {
'phone': '',
'mobile': '',
@ -228,7 +228,7 @@ def test_create_family(conn, create_data, update_data):
resp = requests.post(url, json=payload)
resp.raise_for_status()
res = resp.json()
assert 'E54a' in res['err']
assert res['err'] == 1
assert 'Il existe déjà un Responsable Légal correspondant' in res['err_desc']
assert res['err_class'] == 'passerelle.utils.jsonresponse.APIError'
@ -238,7 +238,7 @@ def test_create_family(conn, create_data, update_data):
resp = requests.post(url, json=payload)
resp.raise_for_status()
res = resp.json()
assert 'E54a' in res['err']
assert res['err'] == 1
assert 'Il existe déjà un Responsable Légal correspondant' in res['err_desc']
assert res['err_class'] == 'passerelle.utils.jsonresponse.APIError'
@ -318,7 +318,7 @@ def test_update_rlg(conn, update_data, rl):
resp = requests.post(url, json=payload)
resp.raise_for_status()
res = resp.json()
assert res['err'] == 'Family-updateFamily-soap:Server'
assert res['err'] == 1
assert (
"Le Responsable légal %s transmis n'est pas celui qui existe pour la famille" % rl in res['err_desc']
)
@ -329,7 +329,7 @@ def test_update_rlg(conn, update_data, rl):
resp = requests.post(url, json=payload)
resp.raise_for_status()
res = resp.json()
assert res['err'] == 'Family-updateFamily-soap:Server'
assert res['err'] == 1
assert (
"Le Responsable légal %s transmis n'est pas celui qui existe pour la famille" % rl in res['err_desc']
)
@ -340,7 +340,7 @@ def test_update_rlg(conn, update_data, rl):
resp = requests.post(url, json=payload)
resp.raise_for_status()
res = resp.json()
assert res['err'] == 'Family-updateFamily-soap:Server'
assert res['err'] == 1
if rl == 1:
assert (
"Le Responsable légal %s transmis n'est pas celui qui existe pour la famille" % rl
@ -434,7 +434,7 @@ def test_create_child(conn, create_data, update_data):
assert 'Il existe déjà un enfant correspondant' in res['err_desc']
res['err_desc'] = 'N/A'
assert res == {
'err': 'Family-createChild-soap:Server',
'err': 1,
'err_class': 'passerelle.utils.jsonresponse.APIError',
'err_desc': 'N/A',
'data': None,
@ -448,7 +448,7 @@ def test_create_child(conn, create_data, update_data):
assert 'Il existe déjà un enfant correspondant' in res['err_desc']
res['err_desc'] = 'N/A'
assert res == {
'err': 'already-child', # error is return into childErrorList
'err': 1, # error is return into childErrorList
'err_class': 'passerelle.utils.jsonresponse.APIError',
'err_desc': 'N/A',
'data': None,

View File

@ -15,7 +15,7 @@ def test_unlink(conn, update_data):
resp = unlink(conn, update_data['name_id'])
resp = unlink(conn, update_data['name_id'])
res = resp.json()
assert res['err'] == 'not-linked'
assert res['err'] == 1
def test_link(conn, update_data):
@ -35,7 +35,7 @@ def test_link(conn, update_data):
resp.raise_for_status()
res = resp.json()
assert res == {
'err': 'Family-readFamily-soap:Server',
'err': 1,
'err_class': 'passerelle.utils.jsonresponse.APIError',
'err_desc': 'E02 : Le dossier numéro [999999] ne correspond à aucune famille',
'data': None,
@ -51,5 +51,5 @@ def test_link(conn, update_data):
resp = requests.post(url, json=payload)
resp.raise_for_status()
res = resp.json()
assert res['err'] == 'not-found'
assert res['err'] == 1
assert 'RL1 does not match' in res['err_desc']