Projet

Général

Profil

0001-tests-do-not-crash-on-non-deterministic-tests-57725.patch

Thomas Noël, 11 octobre 2021 15:39

Télécharger (1,33 ko)

Voir les différences:

Subject: [PATCH] tests: do not crash on non-deterministic tests (#57725)

 tests/test_nanterre.py | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
tests/test_nanterre.py
39 39

  
40 40
    found = list(search.search_email(rsu[0].content['email']))
41 41
    assert found[0].id == rsu[0].id
42
    assert len(found) == 1
43 42

  
44 43
    found = list(search.search_identifier(rsu[0].content['cles_de_federation']['technocarte']))
45 44
    assert found[0].id == rsu[0].id
46
    assert len(found) == 1
47 45

  
48 46
    found = list(search.search_identifier('%d' % rsu[0].id))
49 47
    assert found[0].id == rsu[0].id
......
54 52

  
55 53
    # check that an invalid date is ignored
56 54
    found = list(search.search_email(rsu[0].content['email']).search_birthdate('99/01/1919'))
57
    assert len(found) == 1
55
    assert len(found) > 0
58 56
    found = list(search.search_email(rsu[0].content['email']).search_birthdate('99/1919'))
59
    assert len(found) == 1
57
    assert len(found) > 0
60 58

  
61 59

  
62 60
def test_person_search_api(app, db, rsu):
63
-