Compare commits
15 Commits
f65b930a2f
...
0d1044503c
Author | SHA1 | Date |
---|---|---|
Nicolas Roche | 0d1044503c | |
Nicolas Roche | 0b3d06e932 | |
Nicolas Roche | ffde70564a | |
Nicolas Roche | b4fcf11d49 | |
Nicolas Roche | bbf0df11df | |
Nicolas Roche | b09daae7dd | |
Nicolas Roche | 6bb9afefa5 | |
Nicolas Roche | f4f4d56c0c | |
Nicolas Roche | 734b5e8bc5 | |
Nicolas Roche | 5b5777d917 | |
Nicolas Roche | e6a875435e | |
Nicolas Roche | b03b9eab8d | |
Nicolas Roche | 57630f9239 | |
Nicolas Roche | c4cd36956d | |
Nicolas Roche | 08b0b67fa9 |
|
@ -75,8 +75,7 @@ def test_displaying_school_subscribed(conn, create_data, school_year, exemption)
|
|||
res = resp.json()
|
||||
assert res['err'] == 0
|
||||
schools = [x['subscribeSchoolList'] for x in res['data']['childList'] if x['num'] == claris_id][0]
|
||||
assert len(schools) == 0 # school is filtered, but it is related to an hidden school year
|
||||
# field, not dateStartYearSchool, checked before : #2425
|
||||
assert len(schools) == 0 # school is filtered, see dateStartYearSchool before
|
||||
|
||||
|
||||
def test_school_pre_registration_by_sector(conn, create_data, school_year, exemption):
|
||||
|
@ -146,9 +145,7 @@ def test_school_pre_registration_by_sector(conn, create_data, school_year, exemp
|
|||
resp.raise_for_status()
|
||||
res = resp.json()['data']
|
||||
date_start = [x['dateStartYearSchool'] for x in res if x['text'] == school_year][0]
|
||||
assert date_start[10] > datetime.datetime.now().strftime('%Y-%m-%d')
|
||||
# school is filtered, but it is related to an hidden school year
|
||||
# field, not dateStartYearSchool, see #2425
|
||||
assert date_start[10] > datetime.datetime.now().strftime('%Y-%m-%d') # bug ?
|
||||
|
||||
url = conn + '/read-family?NameID=%s' % create_data['name_id']
|
||||
resp = requests.get(url)
|
||||
|
|
|
@ -59,12 +59,6 @@ def test_catalog_general_loisirs(conn, update_data):
|
|||
'place': {'text': 'Lieu', 'data': {'A10053179757': 'ARGOULETS'}, 'order': ['A10053179757']},
|
||||
'service': {'text': 'Service', 'data': {'A10049329046': 'Sports'}, 'order': ['A10049329046']},
|
||||
}
|
||||
assert item['activity']['activityPortail']['blocNoteList'] == [
|
||||
{
|
||||
'note': "Activité ayant lieu le Mercredi, merci de choisir votre tranche horraire en fonction de l'âge de votre enfant.",
|
||||
'numIndex': 1,
|
||||
}
|
||||
]
|
||||
if item['text'] == 'Promenade forêt enchantée, TEST promenade forêt enchantée, TERRITOIRE OUEST':
|
||||
assert item['criterias'] == {
|
||||
'nature': {
|
||||
|
@ -90,9 +84,6 @@ def test_catalog_general_loisirs(conn, update_data):
|
|||
},
|
||||
'service': {'text': 'Service', 'data': {'A10049329050': 'Sports'}, 'order': ['A10049329050']},
|
||||
}
|
||||
assert item['activity']['activityPortail']['blocNoteList'] == [
|
||||
{'note': 'Activité de promenade en forêt.', 'numIndex': 1}
|
||||
]
|
||||
|
||||
|
||||
def test_catalog_personnalise_loisirs(loisirs_subscribe_info):
|
||||
|
|
|
@ -201,6 +201,7 @@ def test_basket_subscribe_extrasco(conn, create_data, extrasco_subscribe_info, r
|
|||
assert subscriptions(create_data['bart_num']) == []
|
||||
|
||||
|
||||
@pytest.mark.xfail(run=False)
|
||||
def test_basket_subscribe_extrasco2(conn, create_data, extrasco_subscribe_info2, reference_year):
|
||||
"""Subscribing to a generic unit"""
|
||||
assert extrasco_subscribe_info2['info']['controlResult']['controlOK'] is True
|
||||
|
@ -389,16 +390,19 @@ def test_basket_subscribe_extrasco2(conn, create_data, extrasco_subscribe_info2,
|
|||
assert [x['booked'] for x in resp.json()['changes']] == [True, True]
|
||||
assert len([x['prefill'] for x in get_bookings(create_data['maggie_num']) if x['prefill'] is True]) == 2
|
||||
|
||||
# delete basket
|
||||
url = conn + '/delete-basket?NameID=%s' % create_data['name_id']
|
||||
# validate basket
|
||||
url = conn + '/validate-basket?NameID=%s' % create_data['name_id']
|
||||
payload = {'basket_id': basket_id}
|
||||
resp = requests.post(url, json=payload)
|
||||
resp.raise_for_status()
|
||||
assert resp.json()['err'] == 0
|
||||
assert resp.json()['data'] == 'ok'
|
||||
data = resp.json()['data']
|
||||
assert len(data['idInsLst']) == 2 # 6 sur Larden
|
||||
assert len(data['factureLst']) == 0 # No invoice #2187
|
||||
assert get_baskets() == []
|
||||
assert subscriptions(create_data['bart_num']) == []
|
||||
assert subscriptions(create_data['maggie_num']) == []
|
||||
|
||||
assert len(subscriptions(create_data['bart_num'])) == 2
|
||||
assert len(subscriptions(create_data['maggie_num'])) == 2
|
||||
|
||||
|
||||
def test_basket_subscribe_loisirs(conn, create_data, loisirs_subscribe_info, reference_year):
|
||||
|
|
|
@ -63,8 +63,6 @@ Réservations (agenda)
|
|||
.....................
|
||||
$ ./get_person_schedule_list.py -e dev -f 322423 -P 261768 A10055585940 -y 2023 -m 4
|
||||
$ ./update_person_schedule_list.py -e dev -f 322423 -P 261768 -a A10055585940 -u A10055585942 -D "2023-04-12" -A ADD_PRES_PREVI
|
||||
$ ./get_calendar_period_quantity.py -e dev -P 218841 -a A10056523296 -u A10056523298 -S 2023-06-12 -E 2023-06-23
|
||||
$ ./update_person_unit_basket.py -e dev -l S10056971773 -q 2
|
||||
|
||||
Réservations (semaine type)
|
||||
...........................
|
||||
|
|
|
@ -1,37 +0,0 @@
|
|||
#!/usr/bin/python3
|
||||
|
||||
import argparse
|
||||
|
||||
import utils
|
||||
|
||||
PERSON_ID = '263781' # BART
|
||||
ACTIVITY_ID = 'A10055227963'
|
||||
UNIT_ID = 'A10055227965'
|
||||
START_DATE = '2023-02-01'
|
||||
END_DATE = '2023-07-01'
|
||||
|
||||
|
||||
def check(args):
|
||||
utils.configure_logging(args.verbose)
|
||||
client = utils.get_client(args.env, 'Activity')
|
||||
|
||||
result = client.service.getCalendarPeriodQuantity(
|
||||
numPerson=args.person,
|
||||
idAct=args.activity,
|
||||
idUni=args.unit,
|
||||
dateStart=args.start,
|
||||
dateEnd=args.end,
|
||||
)
|
||||
print(result)
|
||||
|
||||
|
||||
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('--activity', '-a', default=ACTIVITY_ID, help='activity id')
|
||||
parser.add_argument('--unit', '-u', default=UNIT_ID, help='unit id')
|
||||
parser.add_argument('--start', '-S', default=START_DATE, help='start date (ex: 2023-02-01)')
|
||||
parser.add_argument('--end', '-E', default=END_DATE, help='end date (ex: 2023-07-01)')
|
||||
check(parser.parse_args())
|
Loading…
Reference in New Issue