-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Note : the code was incorrect, thank us for unit testing it. Side note : ARRAY is unsupported for the `dict` data type in unit tests, currently, so we have to use SQL, meaning we also have to define each and every field out there. Other side note : as a side effect, this checks that the 'profils' field is made empty when going from 'stg' to 'int' layer with DORA services.
- Loading branch information
Showing
4 changed files
with
72 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
pipeline/dbt/tests/fixtures/int_dora__services__expected.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
select | ||
'foo' AS id, | ||
'foo' AS adresse_id, | ||
TRUE AS contact_public, | ||
TRUE AS cumulable, | ||
CAST('2024-07-16' AS DATE) AS date_creation, | ||
CAST('2024-09-13' AS DATE) AS date_maj, | ||
CAST(NULL AS DATE) AS date_suspension, | ||
NULL AS formulaire_en_ligne, | ||
NULL AS frais_autres, | ||
'LETTRE DE MOTIVATION' AS justificatifs, | ||
'https://dora.inclusion.beta.gouv.fr/services/ass-tremplin-inserti-permis-de-conduire-c-imsn' AS lien_source, | ||
'en-presentiel' AS modes_accueil, | ||
'autre' AS modes_orientation_accompagnateur, | ||
NULL AS modes_orientation_accompagnateur_autres, | ||
ARRAY['modes_orientation_beneficiaire:foo'] AS modes_orientation_beneficiaire, | ||
NULL AS modes_orientation_beneficiaire_autres, | ||
'Marquage vélo' AS nom, | ||
'Carte de réduction TER' AS presentation_resume, | ||
NULL AS presentation_detail, | ||
NULL AS prise_rdv, | ||
ARRAY[]::text[] AS profils, | ||
NULL AS recurrence, | ||
'dora' AS source, | ||
'08887e14-cd85-4ec8-85cb-bb7b88d32985' AS structure_id, | ||
ARRAY['thematiques:foo'] AS thematiques, | ||
ARRAY['types:foo'] AS types, | ||
'55' AS zone_diffusion_code, | ||
'Meuse' AS zone_diffusion_nom, | ||
'departement' AS zone_diffusion_type, | ||
ARRAY['pre_requis:foo'] AS pre_requis, | ||
NULL AS page_web, | ||
NULL AS contact_nom_prenom, | ||
NULL AS courriel, | ||
NULL AS telephone, | ||
ARRAY['frais:foo'] AS frais |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
select | ||
'foo' as id, | ||
TRUE as contact_public, | ||
TRUE as cumulable, '2024-07-16' as date_creation, | ||
'2024-09-13' as date_maj, | ||
null as date_suspension, | ||
null as formulaire_en_ligne, null as frais_autres, | ||
'LETTRE DE MOTIVATION' as justificatifs, | ||
'https://dora.inclusion.beta.gouv.fr/services/ass-tremplin-inserti-permis-de-conduire-c-imsn' as lien_source, | ||
'en-presentiel' as modes_accueil, | ||
'autre' as modes_orientation_accompagnateur, | ||
null as modes_orientation_accompagnateur_autres, | ||
ARRAY['modes_orientation_beneficiaire:foo'] as modes_orientation_beneficiaire, | ||
null as modes_orientation_beneficiaire_autres, | ||
'Marquage vélo' as nom, | ||
'Carte de réduction TER' as presentation_resume, | ||
null as presentation_detail, | ||
null as prise_rdv, | ||
ARRAY['profils:foo'] as profils, | ||
null as recurrence, | ||
'dora' as _di_source_id, | ||
'08887e14-cd85-4ec8-85cb-bb7b88d32985' as structure_id, | ||
ARRAY['thematiques:foo'] as thematiques, | ||
ARRAY['types:foo'] as types, | ||
'55' as zone_diffusion_code, | ||
'Meuse' as zone_diffusion_nom, | ||
'departement' as zone_diffusion_type, | ||
ARRAY['pre_requis:foo'] as pre_requis, | ||
null as contact_nom_prenom, | ||
null as courriel, | ||
null as telephone, | ||
'frais:foo' as frais |