toulouse-maelis: [functests] mise à jours suite au sprint (#77362) #240

Merged
nroche merged 3 commits from wip/77362-parsifal-chez-sigec into main 2023-05-15 10:08:41 +02:00
20 changed files with 292 additions and 222 deletions

View File

@ -664,8 +664,8 @@ def perisco_subscribe_info(conn, create_data, reference_year):
return get_subscription_info(
None,
# Sigec made this peri-sco activity available for functests
'TEMPS DU MIDI 22/23',
'TEMPS DU MIDI 22/23',
'TEMPS DU MIDI',
'TEST TEMPS DU MIDI 22/23',
'DOLTO FRANCOISE MATERNELLE',
conn,
create_data['name_id'],

View File

@ -7,6 +7,14 @@
"typeDesc": "NONE",
"isActive": false
},
{
"id": "AUTO_OUT",
"code": "AUTO_OUT",
"text": "Autorisation de sortie - CLAE",
"libelle": "Autorisation de sortie - CLAE",
"typeDesc": "NONE",
"isActive": false
},
{
"id": "AUTRE",
"code": "AUTRE",
@ -16,6 +24,30 @@
"isActive": true,
"note": "rebellious"
},
{
"id": "AUT_OUTADL",
"code": "AUT_OUTADL",
"text": "Autorisation de sortie - ADL",
"libelle": "Autorisation de sortie - ADL",
"typeDesc": "NONE",
"isActive": false
},
{
"id": "AUT_SANT",
"code": "AUT_SANT",
"text": "J'autorise le responsable d'\u00e9tablissement \u00e0 prendre, en cas d'urgence des mesures rendues n\u00e9cessaires par l'\u00e9tat de sant\u00e9 de mon enfant",
"libelle": "J'autorise le responsable d'\u00e9tablissement \u00e0 prendre, en cas d'urgence des mesures rendues n\u00e9cessaires par l'\u00e9tat de sant\u00e9 de mon enfant",
"typeDesc": "NONE",
"isActive": false
},
{
"id": "AUT_TRANS",
"code": "AUT_TRANS",
"text": "J'autorise mon enfant \u00e0 prendre les transports de la collectivit\u00e9",
"libelle": "J'autorise mon enfant \u00e0 prendre les transports de la collectivit\u00e9",
"typeDesc": "NONE",
"isActive": false
},
{
"id": "AVL",
"code": "AVL",
@ -27,8 +59,8 @@
{
"id": "AVS",
"code": "AVS",
"text": "Assistant de Vie scolaire",
"libelle": "Assistant de Vie scolaire ",
"text": "Auxiliaire de Vie scolaire",
"libelle": "Auxiliaire de Vie scolaire ",
"typeDesc": "NONE",
"isActive": false
},
@ -41,6 +73,14 @@
"isActive": false,
"note": null
},
{
"id": "HPURG",
"code": "HPURG",
"text": "Hospitalisation / musures d'urgence",
"libelle": "Hospitalisation / musures d'urgence",
"typeDesc": "NONE",
"isActive": false
},
{
"id": "LENTILLE",
"code": "LENTILLE",

View File

@ -66,8 +66,8 @@
"choiceList": []
},
{
"code": "APE_HFRAT",
"libelle": "SP-handicap fratrie",
"code": "APE_NAIM",
"libelle": "CF-naissance multiple",
"typeDesc": "NONE",
"choiceList": []
},
@ -78,8 +78,8 @@
"choiceList": []
},
{
"code": "APE_NAIM",
"libelle": "CF-naissance multiple",
"code": "APE_HFRAT",
"libelle": "SP-handicap fratrie",
"typeDesc": "NONE",
"choiceList": []
},

View File

@ -1,9 +1,17 @@
[
{
"id": "AVS",
"code": "AVS",
"text": "Assistant de Vie scolaire",
"libelle": "Assistant de Vie scolaire ",
"id": "AUT_OUTADL",
"code": "AUT_OUTADL",
"text": "Autorisation de sortie - ADL",
"libelle": "Autorisation de sortie - ADL",
"typeDesc": "NONE",
"choiceList": []
},
{
"id": "AUTO_OUT",
"code": "AUTO_OUT",
"text": "Autorisation de sortie - CLAE",
"libelle": "Autorisation de sortie - CLAE",
"typeDesc": "NONE",
"choiceList": []
},
@ -23,6 +31,14 @@
"typeDesc": "NONE",
"choiceList": []
},
{
"id": "AVS",
"code": "AVS",
"text": "Auxiliaire de Vie scolaire",
"libelle": "Auxiliaire de Vie scolaire ",
"typeDesc": "NONE",
"choiceList": []
},
{
"id": "ETABSPEC",
"code": "ETABSPEC",
@ -31,6 +47,30 @@
"typeDesc": "NOTE",
"choiceList": []
},
{
"id": "HPURG",
"code": "HPURG",
"text": "Hospitalisation / musures d'urgence",
"libelle": "Hospitalisation / musures d'urgence",
"typeDesc": "NONE",
"choiceList": []
},
{
"id": "AUT_SANT",
"code": "AUT_SANT",
"text": "J'autorise le responsable d'\u00e9tablissement \u00e0 prendre, en cas d'urgence des mesures rendues n\u00e9cessaires par l'\u00e9tat de sant\u00e9 de mon enfant",
"libelle": "J'autorise le responsable d'\u00e9tablissement \u00e0 prendre, en cas d'urgence des mesures rendues n\u00e9cessaires par l'\u00e9tat de sant\u00e9 de mon enfant",
"typeDesc": "NONE",
"choiceList": []
},
{
"id": "AUT_TRANS",
"code": "AUT_TRANS",
"text": "J'autorise mon enfant \u00e0 prendre les transports de la collectivit\u00e9",
"libelle": "J'autorise mon enfant \u00e0 prendre les transports de la collectivit\u00e9",
"typeDesc": "NONE",
"choiceList": []
},
{
"id": "MDPH",
"code": "MDPH",

View File

@ -1,4 +1,10 @@
[
{
"id": "MORAL",
"code": "MORAL",
"text": "",
"libelle": null
},
{
"id": "MME",
"code": "MME",
@ -10,11 +16,5 @@
"code": "MR",
"text": "MONSIEUR",
"libelle": "MONSIEUR"
},
{
"id": "MORAL",
"code": "MORAL",
"text": "MORAL",
"libelle": "MORAL"
}
]

View File

@ -1,12 +1,4 @@
[
{
"id": "AVS",
"code": "AVS",
"text": "Assistant de Vie scolaire",
"libelle": "Assistant de Vie scolaire ",
"typeDesc": "NONE",
"choiceList": []
},
{
"id": "AVL",
"code": "AVL",
@ -15,6 +7,14 @@
"typeDesc": "NONE",
"choiceList": []
},
{
"id": "AVS",
"code": "AVS",
"text": "Auxiliaire de Vie scolaire",
"libelle": "Auxiliaire de Vie scolaire ",
"typeDesc": "NONE",
"choiceList": []
},
{
"id": "ETABSPEC",
"code": "ETABSPEC",

View File

@ -1,34 +1,4 @@
[
{
"id": "ADP",
"age": null,
"code": "ADP",
"text": "adaptation ouverte",
"nature": null,
"libelle": "adaptation ouverte",
"numOrder": null,
"nextLevelCode": null
},
{
"id": "CLA",
"age": null,
"code": "CLA",
"text": "Classe aide p\u00e9dagogique ouvert",
"nature": null,
"libelle": "Classe aide p\u00e9dagogique ouvert",
"numOrder": null,
"nextLevelCode": null
},
{
"id": "CLI",
"age": null,
"code": "CLI",
"text": "Classe Initation ouverte",
"nature": null,
"libelle": "Classe Initation ouverte",
"numOrder": null,
"nextLevelCode": null
},
{
"id": "CE1",
"age": 7,
@ -79,86 +49,6 @@
"numOrder": "5",
"nextLevelCode": "CE1"
},
{
"id": "DAN",
"age": null,
"code": "DAN",
"text": "Danse",
"nature": null,
"libelle": "Danse",
"numOrder": null,
"nextLevelCode": null
},
{
"id": "IME",
"age": null,
"code": "IME",
"text": "IME SCOL FICTIVE",
"nature": null,
"libelle": "IME SCOL FICTIVE",
"numOrder": null,
"nextLevelCode": null
},
{
"id": "INT",
"age": null,
"code": "INT",
"text": "Initiation ouverte",
"nature": null,
"libelle": "Initiation ouverte",
"numOrder": null,
"nextLevelCode": null
},
{
"id": "LYC",
"age": null,
"code": "LYC",
"text": "LYCEE",
"nature": null,
"libelle": "LYCEE",
"numOrder": null,
"nextLevelCode": null
},
{
"id": "OCC",
"age": null,
"code": "OCC",
"text": "Occitan",
"nature": null,
"libelle": "Occitan",
"numOrder": null,
"nextLevelCode": null
},
{
"id": "RAN",
"age": null,
"code": "RAN",
"text": "RANGUEIL SPECIFIQUE",
"nature": null,
"libelle": "RANGUEIL SPECIFIQUE",
"numOrder": null,
"nextLevelCode": null
},
{
"id": "RAS",
"age": null,
"code": "RAS",
"text": "R\u00e9seau d'aide sp\u00e9cialis\u00e9e",
"nature": null,
"libelle": "R\u00e9seau d'aide sp\u00e9cialis\u00e9e",
"numOrder": null,
"nextLevelCode": null
},
{
"id": "MDP",
"age": null,
"code": "MDP",
"text": "SCOL HANDICAP",
"nature": null,
"libelle": "SCOL HANDICAP",
"numOrder": null,
"nextLevelCode": null
},
{
"id": "GS",
"age": 5,
@ -198,45 +88,5 @@
"libelle": "Section tout petit",
"numOrder": "1",
"nextLevelCode": "PS"
},
{
"id": "STP",
"age": null,
"code": "STP",
"text": "Section tout petit en REP",
"nature": null,
"libelle": "Section tout petit en REP",
"numOrder": null,
"nextLevelCode": null
},
{
"id": "UPE",
"age": null,
"code": "UPE",
"text": "Uni P\u00e9da Elev Alloph Arrivants",
"nature": null,
"libelle": "Uni P\u00e9da Elev Alloph Arrivants",
"numOrder": null,
"nextLevelCode": null
},
{
"id": "ULI",
"age": null,
"code": "ULI",
"text": "Unit\u00e9 d'inclusion scolaire",
"nature": null,
"libelle": "Unit\u00e9 d'inclusion scolaire",
"numOrder": null,
"nextLevelCode": null
},
{
"id": "UM ",
"age": null,
"code": "UM ",
"text": "Unit\u00e9 mobile",
"nature": null,
"libelle": "Unit\u00e9 mobile",
"numOrder": null,
"nextLevelCode": null
}
]

View File

@ -5,8 +5,8 @@
"schoolYear": 2022,
"dateEndYearSchool": "2023-07-07T00:00:00+02:00",
"dateStartYearSchool": "2022-09-01T00:00:00+02:00",
"dateEndSubscribeSchool": null,
"dateStartSubscribeSchool": null
"dateEndSubscribeSchool": "2023-09-01T00:00:00+02:00",
"dateStartSubscribeSchool": "2022-09-01T00:00:00+02:00"
},
{
"id": 2023,
@ -14,6 +14,15 @@
"schoolYear": 2023,
"dateEndYearSchool": "2024-07-07T00:00:00+02:00",
"dateStartYearSchool": "2023-09-01T00:00:00+02:00",
"dateEndSubscribeSchool": "2023-09-01T00:00:00+02:00",
"dateStartSubscribeSchool": "2022-09-01T00:00:00+02:00"
},
{
"id": 2024,
"text": "2024",
"schoolYear": 2024,
"dateEndYearSchool": "2024-07-04T00:00:00+02:00",
"dateStartYearSchool": "2023-09-04T00:00:00+02:00",
"dateEndSubscribeSchool": null,
"dateStartSubscribeSchool": null
}

View File

@ -10,8 +10,8 @@
{
"id": "AVS",
"code": "AVS",
"text": "Assistant de Vie scolaire",
"libelle": "Assistant de Vie scolaire ",
"text": "Auxiliaire de Vie scolaire",
"libelle": "Auxiliaire de Vie scolaire ",
"typeDesc": "NONE",
"isActive": false
},

View File

@ -17,12 +17,12 @@ from .conftest import diff
'dietcode',
'document',
'exemption-reasons',
'nursery',
#'nursery',
'organ',
'pai',
'quality',
'quotient',
'regie',
#'regie',
'rl-indicator',
'school-levels',
'school-years',

View File

@ -1,8 +1,10 @@
import datetime
import pytest
import requests
@pytest.mark.xfail(run=False)
def test_create_nursery_demand_on_existing_child(conn, create_data):
url = conn + '/get-nursery-geojson'
resp = requests.get(url)
@ -55,6 +57,7 @@ def test_create_nursery_demand_on_existing_child(conn, create_data):
assert len(res['data']['childList']) == nb_childs
@pytest.mark.xfail(run=False)
def test_create_nursery_demand_adding_new_child(conn, create_data):
url = conn + '/get-nursery-geojson'
resp = requests.get(url)

View File

@ -1,3 +1,5 @@
import datetime
import pytest
import requests
@ -9,7 +11,8 @@ def school_year(conn):
resp.raise_for_status()
res = resp.json()
assert res['err'] == 0
return res['data'][0]['text']
year = res['data'][0]['text']
return str(int(year) + 1) # bug ?
@pytest.fixture(scope='session')
@ -30,7 +33,7 @@ def test_school_pre_registration_by_sector(conn, create_data, school_year, exemp
# create a 7 year-old child
url = conn + '/create-child?NameID=%s' % create_data['name_id']
payload = {
'sexe': 'M',
'sexe': 'F',
'firstname': 'Sego',
'lastname': create_data['lastname'],
'birth': {'dateBirth': '2016-05-09'},
@ -66,6 +69,8 @@ def test_school_pre_registration_by_sector(conn, create_data, school_year, exemp
assert resp.json()['err'] == 0
assert len(resp.json()['data']) == 1
assert resp.json()['data'][0]['text'] == 'DUPONT PIERRE ELEMENTAIRE'
school_id = resp.json()['data'][0]['idSchool']
assert school_id == '2435'
# book
url = conn + '/create-child-school-pre-registration'
@ -75,18 +80,33 @@ def test_school_pre_registration_by_sector(conn, create_data, school_year, exemp
'levelCode': 'CE1',
'dateSubscribe': school_year + '-01-01',
}
resp = requests.get(url)
resp = requests.post(url, json=payload)
resp.raise_for_status()
assert resp.json()['err'] == 0
assert resp.json()['data']['returnMessage'] is None
assert resp.json()['data']['subscribeSchoolBean']['schoolName'] == 'DUPONT PIERRE ELEMENTAIRE'
assert resp.json()['data']['subscribeSchoolBean']['adresse'] == '101 GRANDE-RUE SAINT MICHEL'
# get Sego school from read-family
url = conn + '/read-family?NameID=%s' % create_data['name_id']
resp = requests.get(url)
resp.raise_for_status()
res = resp.json()
assert res['err'] == 0
schools = res['data']['childList'][-1]['subscribeSchoolList']
assert len(schools) == 0 # school is filtered, see dateStartYearSchool bellow
url = conn + '/read-school-years-list'
resp = requests.get(url)
resp.raise_for_status()
res = resp.json()['data']
assert school_year == '2023'
assert res[1]['text'] == school_year
assert res[1]['dateStartYearSchool'][10] > datetime.datetime.now().strftime('%Y-%m-%d')
"""
Pré-inscription d'un enfant de 5 ans en CP avec rappprochement de fratrie pour celui de 7 ans :
c'est une inscription avec "fausse dérogation" :
à savoir on enregistre dans la description de la dérogation le nom du membre de la fratrie
rapprochée mais l'état de la dérogation est vide.
rapprochement dans le secteur de l'enfant.
"""
# get Sego school
url = conn + '/read-child-school-informations?NameID=%s' % create_data['name_id']
@ -99,37 +119,26 @@ def test_school_pre_registration_by_sector(conn, create_data, school_year, exemp
resp.raise_for_status()
assert resp.json()['err'] == 0
data = resp.json()['data']
schools = data['personSubscribeSchoolList']
assert len(schools) == 0 # bug ?
# get Sego school from read-family
url = conn + '/read-family?NameID=%s' % create_data['name_id']
resp = requests.get(url)
resp.raise_for_status()
res = resp.json()
assert res['err'] == 0
schools = res['data']['childList'][-1]['subscribeSchoolList']
schools = data['childSubscribeSchoolInformation']['subscribeSchoolYearList']
assert len(schools) == 1
assert str(schools[0]['year']) == school_year
assert schools[0]['schoolName'] == 'DUPONT PIERRE ELEMENTAIRE'
school_id = schools[0]['idSchool']
assert schools[0]['subscribeSchool']['school']['idSchool'] == school_id
assert schools[0]['subscribeSchool']['perim']['idPerim'] == '2707'
url = conn + '/create-child-school-pre-registration-with-exemption'
url = conn + '/create-child-school-pre-registration-with-sibling'
payload = {
'numPerson': create_data['maggie_num'],
'schoolYear': school_year,
'levelCode': 'GS',
'datePresubscribe': school_year + '-01-01',
'idRequestSchool1': school_id,
'derogReasonCode': exemption, # should be empty ?
'derogComment': 'Sego',
'idSchoolRequested': school_id,
'numPersonSibling': sego_id,
}
resp = requests.get(url)
resp = requests.post(url, json=payload)
resp.raise_for_status()
assert resp.json()['err'] == 0
assert 'returnMessage' not in resp.json()
assert resp.json()['data']['schoolName'] == 'DUPONT PIERRE ELEMENTAIRE'
assert resp.json()['data']['schoolName'] == 'CALAS MATERNELLE'
assert resp.json()['data']['adresse'] == '47 RUE ACHILLE VIADIEU' # same sector
def test_school_pre_registration_by_exemption(conn, create_data, school_year, exemption):
@ -163,29 +172,33 @@ def test_school_pre_registration_by_exemption(conn, create_data, school_year, ex
'derogReasonCode': exemption,
'derogComment': 'bla',
}
resp = requests.get(url)
resp = requests.post(url, json=payload)
resp.raise_for_status()
assert resp.json()['err'] == 0
assert 'returnMessage' not in resp.json()
assert resp.json()['data']['schoolName'] == 'AMIDONNIERS ELEMENTAIRE'
assert resp.json()['data']['adresse'] == '123 ALL DE BRIENNE'
"""
Pré-inscription de l'autre enfant de 5 ans en CP
avec rapprochement de fratrie pour celui de 9 ans :
c'est une inscription avec demande de dérogation en attente
rapprochement hors du secteur de l'enfant.
"""
# get Bart school from read-family
url = conn + '/read-family?NameID=%s' % create_data['name_id']
resp = requests.get(url)
# get Bart school
url = conn + '/read-child-school-informations?NameID=%s' % create_data['name_id']
params = {
'child_id': create_data['bart_num'],
'year': school_year,
'level': 'CM1',
}
resp = requests.get(url, params=params)
resp.raise_for_status()
res = resp.json()
assert res['err'] == 0
schools = res['data']['childList'][0]['subscribeSchoolList']
assert resp.json()['err'] == 0
data = resp.json()['data']
schools = data['childSubscribeSchoolInformation']['subscribeSchoolYearList']
assert len(schools) == 1
assert str(schools[0]['year']) == school_year
assert schools[0]['schoolName'] == 'AMIDONNIERS ELEMENTAIRE'
school_id = schools[0]['idSchool']
assert schools[0]['subscribeSchool']['school']['idSchool'] == school_id
assert schools[0]['subscribeSchool']['perim']['idPerim'] == '2663'
# book
url = conn + '/create-child-school-pre-registration-with-sibling'
@ -197,9 +210,9 @@ def test_school_pre_registration_by_exemption(conn, create_data, school_year, ex
'idSchoolRequested': school_id,
'numPersonSibling': create_data['bart_num'],
}
resp = requests.get(url)
resp = requests.post(url, json=payload)
resp.raise_for_status()
assert resp.json()['err'] == 0
assert 'returnMessage' not in resp.json()
assert resp.json()['data']['schoolName'] == 'AMIDONNIERS ELEMENTAIRE'
assert resp.json()['data']['schoolName'] == 'AMIDONNIERS MATERNELLE'
assert resp.json()['data']['adresse'] == '125 ALL DE BRIENNE'

View File

@ -4,7 +4,7 @@ import requests
def test_perisco(perisco_subscribe_info):
assert perisco_subscribe_info['info']['activity']['libelle1'] == 'TEMPS DU MIDI 22/23'
assert perisco_subscribe_info['info']['activity']['libelle1'] == 'TEST TEMPS DU MIDI 22/23'
def test_perisco_agenda(conn, create_data, perisco_subscribe_info):

View File

@ -10,6 +10,7 @@ from .conftest import link, unlink
# * there is a general catalog to display
@pytest.mark.xfail(run=False)
def test_catalog_general_loisirs(conn, update_data):
unlink(conn, update_data['name_id'])
link(conn, update_data)
@ -39,6 +40,7 @@ def test_catalog_general_loisirs(conn, update_data):
)
@pytest.mark.xfail(run=False)
def test_catalog_personnalise_loisirs(loisirs_subscribe_info):
assert (
loisirs_subscribe_info['info']['activity']['libelle1']
@ -52,6 +54,7 @@ def test_catalog_personnalise_loisirs(loisirs_subscribe_info):
}
@pytest.mark.xfail(run=False)
def test_direct_subscribe(conn, create_data, loisirs_subscribe_info, reference_year):
assert loisirs_subscribe_info['info']['controlResult']['controlOK'] is True

View File

@ -205,6 +205,7 @@ def test_basket_subscribe(conn, create_data, extrasco_subscribe_info, reference_
assert len(subscriptions(create_data['maggie_num'])) == 1
@pytest.mark.xfail(run=False)
def test_basket_subscribe_bis(conn, create_data, loisirs_subscribe_info, reference_year):
assert loisirs_subscribe_info['info']['controlResult']['controlOK'] is True

View File

@ -1,5 +1,6 @@
import datetime
import pytest
import requests
from .conftest import diff, link, unlink
@ -38,6 +39,7 @@ def test_direct_debit_order(conn, create_data):
assert diff(res['data'], 'test_get_rl1_direct_debit_order.json')
@pytest.mark.xfail(run=False)
def test_pay_invoice(conn, create_data, loisirs_subscribe_info, reference_year):
assert loisirs_subscribe_info['info']['controlResult']['controlOK'] is True

View File

@ -0,0 +1,37 @@
#!/usr/bin/python3
import argparse
import utils
YEAR = '2023'
LEVEL = None
PERSON_ID = '263781' # BART NICO
FAMILY_ID = '322573' # NICO
def check(args):
utils.configure_logging(args.verbose)
client = utils.get_client(args.env, 'Family')
results = client.service.getChildSubscribeSchoolInformation(
getFamilySubscribeSchoolInfoRequestBean={
'numDossier': args.family,
'numPerson': args.person,
'schoolYear': args.year,
'level': args.level,
}
)
print(results)
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument('--verbose', '-v', type=int, default=2, help='display errors')
parser.add_argument('--env', '-e', default='integ', help='dev, test, integ, prod')
parser.add_argument('--family', '-f', default=FAMILY_ID, help='family id')
parser.add_argument('--person', '-P', default=PERSON_ID, help='person id')
parser.add_argument('--year', '-y', default=YEAR, help='year (ex: 2023)')
parser.add_argument('--level', '-l', default=LEVEL, help='level (facultatif, ex: CP)')
check(parser.parse_args())

View File

@ -44,7 +44,7 @@ if __name__ == "__main__":
parser.add_argument('--service', '-s', default='Family', help='Family, Activity, Site, Invoice, Ape')
parser.add_argument(
'referential',
help='category childIndicator civility country county csp dietcode direct organ pai quality quotient rlIndicator service situation street town vaccin'
help='category childIndicator civility country county csp dietcode direct document organ pai quality quotient rlIndicator service situation street town vaccin'
+ ' activityNatureType derogReason level yearschool'
+ ' regie'
+ ' apeIndicator',

View File

@ -0,0 +1,41 @@
#!/usr/bin/python3
import argparse
import utils
YEAR = '2023'
LEVEL = None
STREET = '2317'
NUM = '4'
NUM_COMP = None
def check(args):
utils.configure_logging(args.verbose)
client = utils.get_client(args.env, 'Site')
results = client.service.readSchoolForAdressAndLevel(
readSchoolForAdressAndLevelRequestBean={
'schoolYear': args.year,
'adresse': {
'idStreet': args.street,
'num': args.num,
'numComp': args.num_comp,
},
'levelCode': args.level,
}
)
print(results)
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument('--verbose', '-v', type=int, default=2, help='display errors')
parser.add_argument('--env', '-e', default='integ', help='dev, test, integ, prod')
parser.add_argument('--year', '-y', default=YEAR, help='year (ex: 2023)')
parser.add_argument('--level', '-l', default=LEVEL, help='level (facultatif, ex: CP)')
parser.add_argument('--street', '-s', default=STREET, help='year (ex: 2023)')
parser.add_argument('--num', '-n', default=NUM, help='level (ex: CE1)')
parser.add_argument('--num_comp', '-c', default=NUM_COMP, help='level (ex: CP)')
check(parser.parse_args())

View File

@ -0,0 +1,31 @@
#!/usr/bin/python3
import argparse
import utils
YEAR = '2023'
LEVEL = None
PERSON_ID = '263781' # BART NICO
def check(args):
utils.configure_logging(args.verbose)
client = utils.get_client(args.env, 'Family')
results = client.service.readSchoolForChildAndLevel(
numPerson=args.person,
schoolYear=YEAR,
levelCode=args.level,
)
print(results)
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument('--verbose', '-v', type=int, default=2, help='display errors')
parser.add_argument('--env', '-e', default='integ', help='dev, test, integ, prod')
parser.add_argument('--person', '-P', default=PERSON_ID, help='person id')
parser.add_argument('--year', '-y', default=YEAR, help='year (ex: 2023)')
parser.add_argument('--level', '-l', default=LEVEL, help='level (facultatif, ex: CP)')
check(parser.parse_args())