Spaces:
Sleeping
Sleeping
| #!/usr/bin/env python3 | |
| """ | |
| Script de test pour vérifier les mappings des valeurs | |
| """ | |
| from app.repositories.airtable_repository import AirtableRepository | |
| # Créer une instance du repository | |
| repo = AirtableRepository() | |
| # Test des mappings | |
| print("=== Test des mappings ===\n") | |
| # Test situation | |
| situations_test = ["lyceen", "etudiant", "salarie", "demandeur_emploi"] | |
| print("1. Situation avant le contrat:") | |
| for sit in situations_test: | |
| mapped = repo._map_situation_value(sit) | |
| print(f" {sit} → {mapped}") | |
| print("\n2. Nationalité:") | |
| nationalites_test = ["francaise", "ue", "hors_ue"] | |
| for nat in nationalites_test: | |
| mapped = repo._map_nationalite_value(nat) | |
| print(f" {nat} → {mapped}") | |
| print("\n3. BAC:") | |
| bac_test = ["Aucun", "CAP/BEP", "BAC", "BAC +2", "BAC +3/4", "BAC +5+"] | |
| for bac in bac_test: | |
| mapped = repo._map_bac_value(bac) | |
| print(f" {bac} → {mapped}") | |
| print("\n4. Dernier diplôme:") | |
| diplomes_test = [ | |
| "baccalauréat professionnel", | |
| "baccalauréat général", | |
| "bts mco", | |
| "cap", | |
| "brevet", | |
| "aucun" | |
| ] | |
| for dip in diplomes_test: | |
| mapped = repo._map_dernier_diplome_value(dip) | |
| print(f" {dip} → {mapped}") | |
| print("\n✅ Tests de mapping terminés !") | |