Ejemplo n.º 1
0
sitChoDuree = Question('sitChoDuree', ["inf2m", "sup2m"])
sitChoAlloc = Question('sitChoAlloc', ['are', 'ass', 'ata', 'aca',
                                       'asr', 'autind', 'attind', 'allnok'])
page8 = Page([sitChoDuree, sitChoAlloc, BCContinuer])


revPercuSeul = Question('revenusPercusSeul', 'int')
chomPercuSeul = Question('indemnitesChomagePercuesSeul', 'int')
ressPercuSeul = Question('RessourcesPercuesSeul', 'int')
pfPercuSeul = Question('pfPercusSeul', 'int')
page_rev = Page([revPercuSeul, chomPercuSeul,
                 ressPercuSeul, pfPercuSeul, BCContinuer])


logement = Formulaire(url, [Page([]), page0, page1, page2, page3,
                            page4, page5, page6, page7, page8])

if __name__ == '__main__':
    exemple = ['75012',
               'loc', 'false',
               "appartement", 'seul', 'non',
               '500',
               'oui', '01/04/1980', '05/03/1975', 'non', 'non', '2', '0',
               'oui', 'oui',
               'cho',
               'sup2m', 'ass']     
    
#    logement.set_choice(exemple)
    logement.get_tree()

#for sitPro in rsaSitPro.possible_choices:
Ejemplo n.º 2
0
              enfantMoins3, enfantPlus3, enfantPlus14, BCContinuer])

rsaSitPro = Question("rsaSitPro", ["EtudiantEleve", "EtudiantSalarie",
                                   "Disponibilite", "Sabbatique", "Parental",
                                   "SansActivite", "Eti", "EnActivite"])
page4 = Page([rsaSitPro, BCContinuer])


revPercuSeul = Question('revenusPercusSeul', 'int')
chomPercuSeul = Question('indemnitesChomagePercuesSeul', 'int')
ressPercuSeul = Question('RessourcesPercuesSeul', 'int')
pfPercuSeul = Question('pfPercusSeul', 'int')
page_rev = Page([revPercuSeul, chomPercuSeul,
                 ressPercuSeul, pfPercuSeul, BCContinuer])

rsa = Formulaire(url, [Page([]), page0, page1, page2, page3, page4, page_rev])


# TODO: a mettre
def check_formulaire(formulaire):
    if formulaire["seulOuCouple"] == "COUPLE":
        assert formulaire["DateIsole"] == ""
        
if __name__ == '__main__':
    exemple = ["FranceMetro",
               'SEUL', "01/06/2003",
               'MON', "01/06/1960", '', '0', '2', '0',
               "EnActivite",
               '0', '0', '0', '0']
    rsa.set_choice(exemple)
    rsa.fill_in()
sitChoDuree = Question('sitChoDuree', ["inf2m", "sup2m"])
sitChoAlloc = Question('sitChoAlloc', ['are', 'ass', 'ata', 'aca',
                                       'asr', 'autind', 'attind', 'allnok'])
page8 = Page([sitChoDuree, sitChoAlloc, BCContinuer])


revPercuSeul = Question('revenusPercusSeul', 'int')
chomPercuSeul = Question('indemnitesChomagePercuesSeul', 'int')
ressPercuSeul = Question('RessourcesPercuesSeul', 'int')
pfPercuSeul = Question('pfPercusSeul', 'int')
page_rev = Page([revPercuSeul, chomPercuSeul,
                 ressPercuSeul, pfPercuSeul, BCContinuer])


logement = Formulaire(url, [Page([]), page0, page1, page2, page3,
                            page4, page5, page6, page7, page8])

if __name__ == '__main__':
    exemple = ["FranceMetro",
               'SEUL', "01/06/2003",
               'MON', "01/06/1960", '', '0', '2', '0',
               "EnActivite",
               '0', '0', '0', '0']
    exemple = ['75012',
               'loc', 'false',
               "appartement", 'seul', 'non',
               '500',
               'oui', '01/04/1980', '05/03/1975', 'non', 'non', '2', '0',
               'oui', 'oui',
               'cho',
               'sup2m', 'ass']     
sitChoDuree = Question('sitChoDuree', ["inf2m", "sup2m"])
sitChoAlloc = Question(
    'sitChoAlloc',
    ['are', 'ass', 'ata', 'aca', 'asr', 'autind', 'attind', 'allnok'])
page8 = Page([sitChoDuree, sitChoAlloc, BCContinuer])

revPercuSeul = Question('revenusPercusSeul', 'int')
chomPercuSeul = Question('indemnitesChomagePercuesSeul', 'int')
ressPercuSeul = Question('RessourcesPercuesSeul', 'int')
pfPercuSeul = Question('pfPercusSeul', 'int')
page_rev = Page(
    [revPercuSeul, chomPercuSeul, ressPercuSeul, pfPercuSeul, BCContinuer])

logement = Formulaire(
    url,
    [Page([]), page0, page1, page2, page3, page4, page5, page6, page7, page8])

if __name__ == '__main__':
    exemple = [
        "FranceMetro", 'SEUL', "01/06/2003", 'MON', "01/06/1960", '', '0', '2',
        '0', "EnActivite", '0', '0', '0', '0'
    ]
    exemple = [
        '75012', 'loc', 'false', "appartement", 'seul', 'non', '500', 'oui',
        '01/04/1980', '05/03/1975', 'non', 'non', '2', '0', 'oui', 'oui',
        'chomage_imposable', 'sup2m', 'ass'
    ]

    logement.set_choice(exemple)
    logement.fill_in()
sitChoDuree = Question('sitChoDuree', ["inf2m", "sup2m"])
sitChoAlloc = Question(
    'sitChoAlloc',
    ['are', 'ass', 'ata', 'aca', 'asr', 'autind', 'attind', 'allnok'])
page8 = Page([sitChoDuree, sitChoAlloc, BCContinuer])

revPercuSeul = Question('revenusPercusSeul', 'int')
chomPercuSeul = Question('indemnitesChomagePercuesSeul', 'int')
ressPercuSeul = Question('RessourcesPercuesSeul', 'int')
pfPercuSeul = Question('pfPercusSeul', 'int')
page_rev = Page(
    [revPercuSeul, chomPercuSeul, ressPercuSeul, pfPercuSeul, BCContinuer])

logement = Formulaire(
    url,
    [Page([]), page0, page1, page2, page3, page4, page5, page6, page7, page8])

if __name__ == '__main__':
    exemple = [
        '75012', 'loc', 'false', "appartement", 'seul', 'non', '500', 'oui',
        '01/04/1980', '05/03/1975', 'non', 'non', '2', '0', 'oui', 'oui',
        'chomage_imposable', 'sup2m', 'ass'
    ]

    #    logement.set_choice(exemple)
    logement.get_tree()

#for sitPro in rsaSitPro.possible_choices:
#    exemple[-1] = sitPro
#    rsa.set_choice(exemple)
])

rsaSitPro = Question("rsaSitPro", [
    "EtudiantEleve", "EtudiantSalarie", "Disponibilite", "Sabbatique",
    "Parental", "SansActivite", "Eti", "EnActivite"
])
page4 = Page([rsaSitPro, BCContinuer])

revPercuSeul = Question('revenusPercusSeul', 'int')
chomPercuSeul = Question('indemnitesChomagePercuesSeul', 'int')
ressPercuSeul = Question('RessourcesPercuesSeul', 'int')
pfPercuSeul = Question('pfPercusSeul', 'int')
page_rev = Page(
    [revPercuSeul, chomPercuSeul, ressPercuSeul, pfPercuSeul, BCContinuer])

rsa = Formulaire(url, [Page([]), page0, page1, page2, page3, page4, page_rev])


# TODO: a mettre
def check_formulaire(formulaire):
    if formulaire["seulOuCouple"] == "COUPLE":
        assert formulaire["DateIsole"] == ""


if __name__ == '__main__':
    exemple = [
        "FranceMetro", 'SEUL', "01/06/2003", 'MON', "01/06/1960", '', '0', '2',
        '0', "EnActivite", '0', '0', '0', '0'
    ]
    rsa.set_choice(exemple)
    rsa.fill_in()