tests: add non regression test on search by date (#22980)

This commit is contained in:
Benjamin Dauvergne 2018-04-17 11:59:57 +02:00 committed by Thomas NOEL
parent f7a6af2abb
commit e1fbb1da22
1 changed files with 6 additions and 0 deletions

View File

@ -60,6 +60,12 @@ def test_person_search_api(app, db, rsu):
assert (now() - isodate.parse_datetime(individu['date_de_creation'])).seconds < 100
assert individu['date_de_modification'] == individu['date_de_creation']
birthdate = rsu[0].content['date_de_naissance']
response = app.get(url + '?q=%s' % birthdate)
assert response.json['err'] == 0
assert len(response.json['data'])
assert any(data['id'] == rsu[0].id for data in response.json['data'])
def test_create_individu(transactional_db, app, rsu_schema):