示例#1
0
def test_decote_seuil_celib(parameters, instant, period, mocker):
    seuil_celib = 10000
    payload = {"decote": {"seuil_celib": seuil_celib}}
    node = parameters.impot_revenu.decote.seuil_celib

    with mocker.patch.object(node, "update"):
        reform = ParametricReform(parameters, payload, instant, period)
        reform(decote)
        node.update.assert_called_once_with(period=period, value=seuil_celib)
示例#2
0
def test_bareme_seuil(parameters, instant, period, mocker):
    seuil = 10000
    payload = {"bareme": {"seuils": [seuil]}}
    node = parameters.impot_revenu.bareme.brackets[0].threshold

    with mocker.patch.object(node, "update"):
        reform = ParametricReform(parameters, payload, instant, period)
        reform(bareme)
        node.update.assert_called_once_with(period=period, value=seuil)
示例#3
0
def test_bareme_taux(parameters, instant, period, mocker):
    taux = 0.1
    payload = {"bareme": {"taux": [taux]}}
    node = parameters.impot_revenu.bareme.brackets[0].rate

    with mocker.patch.object(node, "update"):
        reform = ParametricReform(parameters, payload, instant, period)
        reform(bareme)
        node.update.assert_called_once_with(period=period, value=taux)
示例#4
0
def test_reduction_ss_condition_revenus(parameters, instant, period, mocker):
    taux = 10000
    payload = {"plafond_qf": {"reduction_ss_condition_revenus": {"taux": taux}}}
    node = parameters.impot_revenu.plafond_qf.reduction_ss_condition_revenus.taux

    with mocker.patch.object(node, "update"):
        reform = ParametricReform(parameters, payload, instant, period)
        reform(reduction_ss_condition_revenus)
        node.update.assert_called_once_with(period=period, value=taux)
示例#5
0
def test_abat_dom(parameters, instant, period, mocker):
    taux_GuadMarReu = 10000
    payload = {"plafond_qf": {"abat_dom": {"taux_GuadMarReu": taux_GuadMarReu}}}
    node = parameters.impot_revenu.plafond_qf.abat_dom.taux_GuadMarReu

    with mocker.patch.object(node, "update"):
        reform = ParametricReform(parameters, payload, instant, period)
        reform(abat_dom)
        node.update.assert_called_once_with(period=period, value=taux_GuadMarReu)
示例#6
0
def test_plafond_qf(parameters, instant, period, mocker):
    maries_ou_pacses = 10000
    payload = {"plafond_qf": {"maries_ou_pacses": maries_ou_pacses}}
    node = parameters.impot_revenu.plafond_qf.maries_ou_pacses

    with mocker.patch.object(node, "update"):
        reform = ParametricReform(parameters, payload, instant, period)
        reform(plafond_qf)
        node.update.assert_called_once_with(period=period, value=maries_ou_pacses)
示例#7
0
def test_abattement_rni(parameters, instant, period, mocker):
    montant_1 = 10000
    payload = {
        "abattements_rni": {"personne_agee_ou_invalide": {"montant_1": montant_1}}
    }
    node = parameters.impot_revenu.abattements_rni.personne_agee_ou_invalide.montant_1

    with mocker.patch.object(node, "update"):
        reform = ParametricReform(parameters, payload, instant, period)
        reform(abattements_rni)
        node.update.assert_called_once_with(period=period, value=montant_1)