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)
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)
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)
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)
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)
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)
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)