toulouse-maelis: [functests] re-enabling tests on extra-sco (#77634)
This commit is contained in:
parent
6f461e6366
commit
db7a2fc925
|
@ -715,8 +715,8 @@ def extrasco_subscribe_info(conn, create_data, reference_year):
|
|||
return get_subscription_info(
|
||||
'EXTRASCO',
|
||||
# Sigec made this extra-sco activity available for functests
|
||||
'ADL ELEMENTAIRE Maourine Avril 2023',
|
||||
'ADL ELEMENTAIRE Maourine Avril 2023',
|
||||
'TEST ADL ELEMENTAIRE Maourine Juin',
|
||||
'TEST ADL ELEMENTAIRE Maourine FEVRIER 22/23',
|
||||
'MAOURINE (la) ELEMENTAIRE',
|
||||
conn,
|
||||
create_data['name_id'],
|
||||
|
|
|
@ -4,7 +4,10 @@ import requests
|
|||
|
||||
@pytest.mark.xfail(run=False)
|
||||
def test_catalog_personnalise_extrasco(extrasco_subscribe_info):
|
||||
assert extrasco_subscribe_info['info']['activity']['libelle1'] == 'ADL ELEMENTAIRE Maourine Avril 2023'
|
||||
assert (
|
||||
extrasco_subscribe_info['info']['activity']['libelle1']
|
||||
== 'TEST ADL ELEMENTAIRE Maourine FEVRIER 22/23'
|
||||
)
|
||||
assert extrasco_subscribe_info['info']['calendarGeneration']['code'] == 'REQUIRED'
|
||||
assert extrasco_subscribe_info['info']['billingInformation'] == {
|
||||
'modeFact': 'PRESENCE',
|
||||
|
@ -34,7 +37,6 @@ def test_direct_subscribe(conn, create_data, extrasco_subscribe_info, reference_
|
|||
assert resp.json()['data'] == {'controlOK': True, 'message': None}
|
||||
|
||||
|
||||
@pytest.mark.xfail(run=False)
|
||||
def test_subscribe_with_conveyance(conn, create_data, extrasco_subscribe_info):
|
||||
assert extrasco_subscribe_info['info']['controlResult']['controlOK'] is True
|
||||
|
||||
|
@ -116,6 +118,14 @@ def test_subscribe_with_recurrent_week(conn, create_data, extrasco_subscribe_inf
|
|||
assert resp.json()['err'] == 0
|
||||
assert any(x['prefill'] for x in resp.json()['data'])
|
||||
|
||||
# check quantity into basket
|
||||
url = conn + '/get-baskets?NameID=%s' % create_data['name_id']
|
||||
resp = requests.get(url)
|
||||
resp.raise_for_status()
|
||||
assert resp.json()['err'] == 0
|
||||
line = resp.json()['data'][0]['lignes'][0]
|
||||
assert (line['prixUnit'], line['qte'], line['montant']) == (11.5, 4.0, 46.0)
|
||||
|
||||
# remove subscription
|
||||
url = conn + '/delete-basket?NameID=%s' % create_data['name_id']
|
||||
payload = {'basket_id': basket_id}
|
||||
|
@ -180,6 +190,14 @@ def test_subscribe_with_agenda(conn, create_data, extrasco_subscribe_info):
|
|||
# there is now 2 bookings
|
||||
assert len([x['prefill'] for x in get_bookings() if x['prefill'] is True]) == 2
|
||||
|
||||
# check quantity into basket
|
||||
url = conn + '/get-baskets?NameID=%s' % create_data['name_id']
|
||||
resp = requests.get(url)
|
||||
resp.raise_for_status()
|
||||
assert resp.json()['err'] == 0
|
||||
line = resp.json()['data'][0]['lignes'][0]
|
||||
assert (line['prixUnit'], line['qte'], line['montant']) == (11.5, 0.0, 0.0)
|
||||
|
||||
# unbook slots
|
||||
url = conn + '/update-activity-agenda/?NameID=%s' % create_data['name_id']
|
||||
payload = {
|
||||
|
|
Loading…
Reference in New Issue