Commit 08a03ad4 authored by David Foucher's avatar David Foucher

Legacy wrapper for TMF

parent 33f60e0f
......@@ -3,10 +3,20 @@ from collections import namedtuple
from pathlib import Path
import pytest
from roll.extensions import traceback
from trefle.rules import LABELS, SCHEMA
@pytest.fixture(scope='session')
def app():
# Do not import before pytest_configure has run to patch env vars.
from trefle.api import app as trefleapp
# Get the traceback in console in case of unhandled error.
traceback(trefleapp)
yield trefleapp
@pytest.fixture
def patch_schema():
before_schema = SCHEMA.copy()
......
[
{
"test": true,
"formationVisee": {
"codeFormation": "21_65896"
},
"individu": {
"type": "DE",
"chomageDePlusDeSixMois": true,
"departementHabitation": "62",
"dateNaissance": "1980-12-12",
"niveauEtude": 3,
"heuresCPF": "200",
"typeAllocation": {
"type": "non"
},
"contratAide": {
"enCours": false,
"termine": true
}
}
},
{
"test": true,
"formationVisee": {
"codeFormation": "04_A814179"
},
"individu": {
"type": "DE",
"chomageDePlusDeSixMois": true,
"departementHabitation": "93",
"dateNaissance": "1980-12-12",
"niveauEtude": 3,
"heuresCPF": "100",
"typeAllocation": {
"type": "non"
},
"contratAide": {
"enCours": false,
"termine": true
}
}
},
{
"test": true,
"formationVisee": {
"codeFormation": "24_113168"
},
"individu": {
"type": "DE",
"chomageDePlusDeSixMois": true,
"departementHabitation": "13",
"dateNaissance": "1980-12-12",
"niveauEtude": 3,
"heuresCPF": "100",
"typeAllocation": {
"type": "non"
},
"contratAide": {
"enCours": false,
"termine": true
}
}
},
{
"test": true,
"formationVisee": {
"codeFormation": "17_37091"
},
"individu": {
"type": "DE",
"chomageDePlusDeSixMois": true,
"departementHabitation": "93",
"dateNaissance": "1980-12-12",
"niveauEtude": 3,
"heuresCPF": "100",
"typeAllocation": {
"type": "non"
},
"contratAide": {
"enCours": false,
"termine": true
},
"travailleurHandicape": true
}
},
{
"test": true,
"formationVisee": {
"codeFormation": "14_AF_0000029913"
},
"individu": {
"type": "DE",
"chomageDePlusDeSixMois": true,
"departementHabitation": "49",
"dateNaissance": "1980-12-12",
"niveauEtude": 3,
"heuresCPF": "100",
"typeAllocation": {
"type": "non"
},
"contratAide": {
"enCours": false,
"termine": true
}
}
},
{
"test": true,
"formationVisee": {
"codeFormation": "14_AF_0000056890"
},
"individu": {
"type": "DE",
"chomageDePlusDeSixMois": true,
"departementHabitation": "94",
"dateNaissance": "1980-12-12",
"niveauEtude": 3,
"heuresCPF": "100",
"typeAllocation": {
"type": "RSA"
},
"contratAide": {
"enCours": false,
"termine": true
}
}
},
{
"test": true,
"formationVisee": {
"codeFormation": "17_33241"
},
"individu": {
"type": "DE",
"chomageDePlusDeSixMois": true,
"departementHabitation": "57",
</