Skip to content

Commit

Permalink
Fix test, add related doc
Browse files Browse the repository at this point in the history
  • Loading branch information
thbar committed Jan 16, 2025
1 parent ed5df4d commit a23a8bf
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions apps/transport/test/transport/irve/irve_extractor_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,21 @@ defmodule Transport.IRVE.ExtractorTest do
}
end

@doc """
Build a typical data gouv API (list datasets) response.
If you need to verify or modify the payload, see examples at:
- https://www.data.gouv.fr/api/1/datasets/?page=1&page_size=20&schema=etalab%2Fschema-irve-statique
- https://doc.data.gouv.fr/api/reference/#/datasets/list_datasets
"""
def build_page_payload do
%{
"data" => [
%{
"id" => "the-dataset-id",
"title" => "the-dataset-title",
"organization" => %{
"id" => "the-org-id",
"name" => "the-org",
"page" => "http://the-org"
},
Expand Down Expand Up @@ -75,6 +83,7 @@ defmodule Transport.IRVE.ExtractorTest do
%{
dataset_id: "the-dataset-id",
dataset_title: "the-dataset-title",
dataset_organisation_id: "the-org-id",
dataset_organisation_name: "the-org",
dataset_organisation_url: "http://the-org",
resource_id: "the-resource-id",
Expand Down

0 comments on commit a23a8bf

Please sign in to comment.