passerelle/functests/toulouse_maelis/test_04_loisirs.py

22 lines
586 B
Python

import datetime
import requests
from .conftest import link, unlink
# LOISIR is a subset of EXTRACO, we only test the genaral catalog cell here
def test_catalog_general_loisirs(conn, update_data):
unlink(conn, update_data['name_id'])
link(conn, update_data)
url = conn + '/read-activity-list'
params = {'ref_date': datetime.date.today().strftime('%Y-%m-%d')}
resp = requests.get(url, params=params)
resp.raise_for_status()
assert resp.json()['err'] == 0
# still not nature code defined on LOISIR activities
assert len(resp.json()['data']) == 0