from athlete import ListeAthlete
def test_listeAthlete(client):
    response = client.get("/")
    listeAthlete = ListeAthlete()
    listeAthlete.loadFromJsonData(response.data)
    assert listeAthlete.root is not None
    assert len(listeAthlete.root) > 0
    assert listeAthlete.root[0].prenom is not None
    assert listeAthlete.root[0].nom is not None
    assert listeAthlete.root[0].pays is not None
    assert listeAthlete.root[0].sexe is not None
    assert listeAthlete.root[0].image is not None
    assert listeAthlete.root[0].disciplines is not None
    assert listeAthlete.root[0].records is not None
    assert listeAthlete.root[0].id is not None
    assert listeAthlete.root[0].id > 0
    assert listeAthlete.root[0].prenom != ""
    assert listeAthlete.root[0].nom != ""
    assert listeAthlete.root[0].pays != ""
    assert listeAthlete.root[0].sexe != ""
    assert listeAthlete.root[0].image != ""
    assert listeAthlete.root[0].disciplines != []
