Esempio n. 1
0
def test_list_published_laws():
    service = LawService()
    laws = service.published_laws(13)

    assert 261 == len(laws)

    assert laws[0].year == 2012
    assert laws[0].legislature == 13
    assert laws[0].type == 'law'
    assert laws[0].kind is None
    assert laws[0].number == '2012-410'
    assert laws[0].url_legi == 'https://www.legifrance.gouv.fr/affichLoiPubliee.do?idDocument=JORFDOLE000024106525&type=general&legislature=13'
    assert laws[0].id_legi == 'JORFDOLE000024106525'
    assert laws[0].pub_date == date(2012, 3, 27)
    assert laws[0].title == u'LOI n° 2012-410 du 27 mars 2012 relative à la protection de l\'identité'

    assert laws[19].kind == 'organique'
Esempio n. 2
0
def test_list_published_laws():
    service = LawService()
    laws = service.published_laws(13)

    assert 262 == len(laws)

    assert laws[0].year == 2012
    assert laws[0].legislature == 13
    assert laws[0].type == 'law'
    assert laws[0].kind is None
    assert laws[0].number == '2012-410'
    assert laws[
        0].url_legi == 'https://www.legifrance.gouv.fr/dossierlegislatif/JORFDOLE000024106525/'
    assert laws[0].id_legi == 'JORFDOLE000024106525'
    assert laws[0].pub_date == date(2012, 3, 27)
    assert laws[
        0].title == u'LOI n° 2012-410 du 27 mars 2012 relative à la protection de l\'identité'

    assert laws[18].kind == 'organique'