Skip to content

Commit

Permalink
tests: add tests for api-sirene connector
Browse files Browse the repository at this point in the history
  • Loading branch information
rdubigny committed Jul 28, 2023
1 parent 6ab23d8 commit 4b1a139
Show file tree
Hide file tree
Showing 5 changed files with 431 additions and 0 deletions.
149 changes: 149 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,16 @@
},
"devDependencies": {
"@sinonjs/fake-timers": "^10.0.0",
"@types/chai": "^4.3.5",
"@types/chai-as-promised": "^7.1.5",
"@types/mocha": "^10.0.1",
"@types/sinonjs__fake-timers": "^8.1.2",
"chai": "^4.3.7",
"chai-as-promised": "^7.1.1",
"concurrently": "^7.6.0",
"copy-and-watch": "^0.1.6",
"cypress-mailslurp": "^1.7.0",
"nock": "^13.3.2",
"nodemon": "^2.0.20",
"prettier": "^1.19.1",
"ts-mocha": "^10.0.0"
Expand Down
102 changes: 102 additions & 0 deletions test/api-sirene-data/diffusible.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
{
"header": {
"statut": 200,
"message": "ok"
},
"etablissement": {
"siren": "200071843",
"nic": "00060",
"siret": "20007184300060",
"statutDiffusionEtablissement": "O",
"dateCreationEtablissement": "2021-01-27",
"trancheEffectifsEtablissement": null,
"anneeEffectifsEtablissement": null,
"activitePrincipaleRegistreMetiersEtablissement": null,
"dateDernierTraitementEtablissement": "2021-02-02T09:48:38",
"etablissementSiege": true,
"nombrePeriodesEtablissement": 1,
"uniteLegale": {
"etatAdministratifUniteLegale": "A",
"statutDiffusionUniteLegale": "O",
"dateCreationUniteLegale": "2017-01-01",
"categorieJuridiqueUniteLegale": "7346",
"denominationUniteLegale": "CC DU VEXIN NORMAND",
"sigleUniteLegale": null,
"denominationUsuelle1UniteLegale": null,
"denominationUsuelle2UniteLegale": null,
"denominationUsuelle3UniteLegale": null,
"sexeUniteLegale": null,
"nomUniteLegale": null,
"nomUsageUniteLegale": null,
"prenom1UniteLegale": null,
"prenom2UniteLegale": null,
"prenom3UniteLegale": null,
"prenom4UniteLegale": null,
"prenomUsuelUniteLegale": null,
"pseudonymeUniteLegale": null,
"activitePrincipaleUniteLegale": "84.11Z",
"nomenclatureActivitePrincipaleUniteLegale": "NAFRev2",
"identifiantAssociationUniteLegale": null,
"economieSocialeSolidaireUniteLegale": "N",
"societeMissionUniteLegale": null,
"caractereEmployeurUniteLegale": "O",
"trancheEffectifsUniteLegale": "22",
"anneeEffectifsUniteLegale": "2020",
"nicSiegeUniteLegale": "00060",
"dateDernierTraitementUniteLegale": "2023-07-20T10:04:55",
"categorieEntreprise": "PME",
"anneeCategorieEntreprise": "2020"
},
"adresseEtablissement": {
"complementAdresseEtablissement": null,
"numeroVoieEtablissement": "3",
"indiceRepetitionEtablissement": null,
"typeVoieEtablissement": "RUE",
"libelleVoieEtablissement": "MAISON DE VATIMESNIL",
"codePostalEtablissement": "27150",
"libelleCommuneEtablissement": "ETREPAGNY",
"libelleCommuneEtrangerEtablissement": null,
"distributionSpecialeEtablissement": null,
"codeCommuneEtablissement": "27226",
"codeCedexEtablissement": null,
"libelleCedexEtablissement": null,
"codePaysEtrangerEtablissement": null,
"libellePaysEtrangerEtablissement": null
},
"adresse2Etablissement": {
"complementAdresse2Etablissement": null,
"numeroVoie2Etablissement": null,
"indiceRepetition2Etablissement": null,
"typeVoie2Etablissement": null,
"libelleVoie2Etablissement": null,
"codePostal2Etablissement": null,
"libelleCommune2Etablissement": null,
"libelleCommuneEtranger2Etablissement": null,
"distributionSpeciale2Etablissement": null,
"codeCommune2Etablissement": null,
"codeCedex2Etablissement": null,
"libelleCedex2Etablissement": null,
"codePaysEtranger2Etablissement": null,
"libellePaysEtranger2Etablissement": null
},
"periodesEtablissement": [
{
"dateFin": null,
"dateDebut": "2021-01-27",
"etatAdministratifEtablissement": "A",
"changementEtatAdministratifEtablissement": false,
"enseigne1Etablissement": null,
"enseigne2Etablissement": null,
"enseigne3Etablissement": null,
"changementEnseigneEtablissement": false,
"denominationUsuelleEtablissement": null,
"changementDenominationUsuelleEtablissement": false,
"activitePrincipaleEtablissement": "84.11Z",
"nomenclatureActivitePrincipaleEtablissement": "NAFRev2",
"changementActivitePrincipaleEtablissement": false,
"caractereEmployeurEtablissement": "O",
"changementCaractereEmployeurEtablissement": false
}
]
}
}
Loading

0 comments on commit 4b1a139

Please sign in to comment.