diff --git a/tests/core/test_browse.py b/tests/core/test_browse.py index 0e9e0a41..755be0c6 100644 --- a/tests/core/test_browse.py +++ b/tests/core/test_browse.py @@ -8,7 +8,7 @@ def test_browse_rds_families(data_db): setup_with_two_docs(data_db) geo = data_db.query(Geography).get(1) - expected = 2 + expected = 1 args = BrowseArgs( country_codes=[geo.value], diff --git a/tests/non_search/app/documents/test_get_document_families.py b/tests/non_search/app/documents/test_get_document_families.py index f2151fb7..2cf8094c 100644 --- a/tests/non_search/app/documents/test_get_document_families.py +++ b/tests/non_search/app/documents/test_get_document_families.py @@ -199,7 +199,7 @@ def test_documents_doc_slug_preexisting_objects( assert len(family.keys()) == N_FAMILY_OVERVIEW_KEYS assert family["title"] == "Fam2" assert family["import_id"] == "CCLW.family.2002.0" - assert family["geography"] == "South Asia" + assert family["geography"] == "AFG" assert family["category"] == "Executive" assert family["slug"] == "FamSlug2" assert family["corpus_id"] == "CCLW.corpus.i00000001.n0000" diff --git a/tests/non_search/setup_helpers.py b/tests/non_search/setup_helpers.py index e544059a..d5440607 100644 --- a/tests/non_search/setup_helpers.py +++ b/tests/non_search/setup_helpers.py @@ -1,3 +1,5 @@ +from typing import Any, Dict + from sqlalchemy.orm import Session from tests.non_search.dfce_helpers import ( @@ -91,7 +93,7 @@ def get_default_families(): "title": "Fam2", "slug": "FamSlug2", "description": "Summary2", - "geography_id": 1, + "geography_id": 2, "category": "Executive", "documents": [], "metadata": { @@ -147,6 +149,37 @@ def setup_with_two_docs(db: Session): ) +def setup_with_documents_large_with_families( + documents_large: list[Dict[str, Any]], + db: Session, +): + # Collection + collection1, collection2 = get_default_collections() + add_collections(db, collections=[collection1]) + + # Family + Document + events + family1, family2 = get_default_families() + + family1["metadata"] = { + "topic": "Mitigation", + "sector": "Economy-wide", + } + + split_index = len(documents_large) // 2 + + family1["documents"] = documents_large[:split_index] + family2["documents"] = documents_large[split_index:] + add_families(db, families=[family1, family2]) + + # Collection - Family + link_collection_family( + db, + [ + (collection1["import_id"], family1["import_id"]), + ], + ) + + def setup_with_two_docs_one_family(db: Session): # Collection collection1, collection2 = get_default_collections() diff --git a/tests/unit/__init__.py b/tests/unit/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/unit/app/core/test_pipeline.py b/tests/unit/app/core/test_pipeline.py index e2b12db8..25159f67 100644 --- a/tests/unit/app/core/test_pipeline.py +++ b/tests/unit/app/core/test_pipeline.py @@ -1,3 +1,5 @@ +from typing import Dict + from sqlalchemy.orm import Session from app.core.ingestion.pipeline import ( @@ -6,6 +8,7 @@ ) from tests.non_search.setup_helpers import ( setup_docs_with_two_orgs, + setup_with_documents_large_with_families, setup_with_two_docs_one_family, setup_with_two_unpublished_docs, ) @@ -44,6 +47,17 @@ def test_generate_pipeline_ingest_input(data_db: Session): assert state_rows[0].document_title == "Document2" +def test_generate_pipeline_ingest_input_with_fixture( + documents_large: list[Dict], + data_db: Session, +): + setup_with_documents_large_with_families(documents_large, data_db) + + state_rows = generate_pipeline_ingest_input(data_db) + + assert len(state_rows) == 23 + + def test_generate_pipeline_ingest_input_no_collection_family_link(data_db: Session): setup_docs_with_two_orgs(data_db) diff --git a/tests/unit/conftest.py b/tests/unit/conftest.py new file mode 100644 index 00000000..a7947620 --- /dev/null +++ b/tests/unit/conftest.py @@ -0,0 +1,21 @@ +import json +import os +from pathlib import Path +from typing import Any, Dict + +import pytest + + +@pytest.fixture +def documents_large() -> list[Dict[str, Any]]: + documents_dir = Path(__file__).parent / "fixtures" + + documents = [] + + for file_name in os.listdir(documents_dir): + file_path = documents_dir / file_name + + with open(file_path, "r") as f: + documents.append(json.load(f)) + + return documents diff --git a/tests/unit/fixtures/CCLW.document.i00000002.n0000.json b/tests/unit/fixtures/CCLW.document.i00000002.n0000.json new file mode 100644 index 00000000..4b4db43d --- /dev/null +++ b/tests/unit/fixtures/CCLW.document.i00000002.n0000.json @@ -0,0 +1,24 @@ +{ + "title": "National Energy and Climate Plan 2019 Draft ", + "slug": "national-energy-and-climate-plan-2019-draft_6002", + "md5_sum": "653834d6f224328bc3711f5a9d0db0a4", + "url": "https://www.energy-community.org/dam/jcr:a0c2b8a8-96c8-4423-993a-537cf51daa65/Draft_NECP_AL_%202021.pdf", + "content_type": "application/pdf", + "import_id": "CCLW.document.i00000002.n0000", + "language_variant": "Original Language", + "status": "PUBLISHED", + "metadata": { + "role": ["MAIN"], + "type": ["Plan"] + }, + "languages": ["eng"], + "events": [ + { + "import_id": "CPR.Event.13.0", + "title": "Published", + "date": "2019-12-25", + "type": "Passed/Approved", + "status": "OK" + } + ] +} diff --git a/tests/unit/fixtures/CCLW.document.i00000006.n0000.json b/tests/unit/fixtures/CCLW.document.i00000006.n0000.json new file mode 100644 index 00000000..4843b487 --- /dev/null +++ b/tests/unit/fixtures/CCLW.document.i00000006.n0000.json @@ -0,0 +1,24 @@ +{ + "title": "Cabinet Decision approving the Plan", + "slug": "cabinet-decision-approving-the-plan_3615", + "md5_sum": null, + "url": "https://www.thepresidency.gov.za/cabinet-statements/statement-cabinet-meeting-19-october-2022", + "content_type": "text/html", + "import_id": "CCLW.document.i00000006.n0000", + "language_variant": "Original Language", + "status": "PUBLISHED", + "metadata": { + "role": ["MAIN"], + "type": ["Plan"] + }, + "languages": ["eng"], + "events": [ + { + "import_id": "CPR.Event.14.0", + "title": "Published", + "date": "2019-12-25", + "type": "Passed/Approved", + "status": "OK" + } + ] +} diff --git a/tests/unit/fixtures/CCLW.document.i00000008.n0000.json b/tests/unit/fixtures/CCLW.document.i00000008.n0000.json new file mode 100644 index 00000000..ece3b573 --- /dev/null +++ b/tests/unit/fixtures/CCLW.document.i00000008.n0000.json @@ -0,0 +1,24 @@ +{ + "title": "Cabinet Decision approving the Framework", + "slug": "cabinet-decision-approving-the-framework_b837", + "md5_sum": null, + "url": "https://www.thepresidency.gov.za/cabinet-statements/statement-virtual-cabinet-meeting-31-august-2022", + "content_type": "text/html", + "import_id": "CCLW.document.i00000008.n0000", + "language_variant": "Original Language", + "status": "PUBLISHED", + "metadata": { + "role": ["MAIN"], + "type": ["Plan"] + }, + "languages": ["eng"], + "events": [ + { + "import_id": "CPR.Event.15.0", + "title": "Published", + "date": "2019-12-25", + "type": "Passed/Approved", + "status": "OK" + } + ] +} diff --git a/tests/unit/fixtures/CCLW.document.i00000016.n0000.json b/tests/unit/fixtures/CCLW.document.i00000016.n0000.json new file mode 100644 index 00000000..c6266378 --- /dev/null +++ b/tests/unit/fixtures/CCLW.document.i00000016.n0000.json @@ -0,0 +1,24 @@ +{ + "title": "Decree", + "slug": "decree_35ee", + "md5_sum": null, + "url": "https://www.legifrance.gouv.fr/jorf/id/JORFTEXT000031740341", + "content_type": "text/html", + "import_id": "CCLW.document.i00000016.n0000", + "language_variant": "Original Language", + "status": "DELETED", + "metadata": { + "role": ["MAIN"], + "type": ["Plan"] + }, + "languages": ["eng"], + "events": [ + { + "import_id": "CPR.Event.16.0", + "title": "Published", + "date": "2019-12-25", + "type": "Passed/Approved", + "status": "OK" + } + ] +} diff --git a/tests/unit/fixtures/CCLW.document.i00000018.n0000.json b/tests/unit/fixtures/CCLW.document.i00000018.n0000.json new file mode 100644 index 00000000..078582a5 --- /dev/null +++ b/tests/unit/fixtures/CCLW.document.i00000018.n0000.json @@ -0,0 +1,24 @@ +{ + "title": "Decree", + "slug": "decree_dd6c", + "md5_sum": "78d5911a24f9c01b1b12671e5d1eb3e0", + "url": "https://www.tresor.economie.gouv.fr/Articles/80af1116-2fcd-47d0-ad1d-ea24352e6295/files/273f9026-bbc4-4fc2-ba60-f86f6fe16c1f", + "content_type": "application/pdf", + "import_id": "CCLW.document.i00000018.n0000", + "language_variant": "Original Language", + "status": "PUBLISHED", + "metadata": { + "role": ["MAIN"], + "type": ["Plan"] + }, + "languages": ["eng"], + "events": [ + { + "import_id": "CPR.Event.17.0", + "title": "Published", + "date": "2019-12-25", + "type": "Passed/Approved", + "status": "OK" + } + ] +} diff --git a/tests/unit/fixtures/CCLW.document.i00000026.n0000.json b/tests/unit/fixtures/CCLW.document.i00000026.n0000.json new file mode 100644 index 00000000..59f0199d --- /dev/null +++ b/tests/unit/fixtures/CCLW.document.i00000026.n0000.json @@ -0,0 +1,24 @@ +{ + "title": "National Adaptation Plan ", + "slug": "national-adaptation-plan_4e44", + "md5_sum": null, + "url": "https://unfccc.int/sites/default/files/resource/NAP-Bosnia-and-Herzegovina%20.pdf", + "content_type": "text/html", + "import_id": "CCLW.document.i00000026.n0000", + "language_variant": "Original Language", + "status": "PUBLISHED", + "metadata": { + "role": ["MAIN"], + "type": ["Plan"] + }, + "languages": ["eng"], + "events": [ + { + "import_id": "CPR.Event.18.0", + "title": "Published", + "date": "2019-12-25", + "type": "Passed/Approved", + "status": "OK" + } + ] +} diff --git a/tests/unit/fixtures/CCLW.document.i00000030.n0000.json b/tests/unit/fixtures/CCLW.document.i00000030.n0000.json new file mode 100644 index 00000000..3fd210d8 --- /dev/null +++ b/tests/unit/fixtures/CCLW.document.i00000030.n0000.json @@ -0,0 +1,24 @@ +{ + "title": "Law No. 08/L-025 on Protection of Air from Pollution", + "slug": "law-no-08-l-025-on-protection-of-air-from-pollution_e1e1", + "md5_sum": null, + "url": "https://gzk.rks-gov.net/ActDocumentDetail.aspx?ActID=60330", + "content_type": "text/html", + "import_id": "CCLW.document.i00000030.n0000", + "language_variant": "Original Language", + "status": "PUBLISHED", + "metadata": { + "role": ["MAIN"], + "type": ["Plan"] + }, + "languages": ["eng"], + "events": [ + { + "import_id": "CPR.Event.19.0", + "title": "Published", + "date": "2019-12-25", + "type": "Passed/Approved", + "status": "OK" + } + ] +} diff --git a/tests/unit/fixtures/CCLW.document.i00000038.n0000.json b/tests/unit/fixtures/CCLW.document.i00000038.n0000.json new file mode 100644 index 00000000..4b3884a1 --- /dev/null +++ b/tests/unit/fixtures/CCLW.document.i00000038.n0000.json @@ -0,0 +1,24 @@ +{ + "title": "Growth Acceleration Plan 2022-2026 ", + "slug": "growth-acceleration-plan-2022-2026_853e", + "md5_sum": null, + "url": "https://finance.gov.mk/wp-content/uploads/2022/01/Growth-Acceleration-Plan_final-1.doc", + "content_type": null, + "import_id": "CCLW.document.i00000038.n0000", + "language_variant": "Original Language", + "status": "PUBLISHED", + "metadata": { + "role": ["MAIN"], + "type": ["Plan"] + }, + "languages": ["eng"], + "events": [ + { + "import_id": "CPR.Event.20.0", + "title": "Published", + "date": "2019-12-25", + "type": "Passed/Approved", + "status": "OK" + } + ] +} diff --git a/tests/unit/fixtures/CCLW.document.i00000040.n0000.json b/tests/unit/fixtures/CCLW.document.i00000040.n0000.json new file mode 100644 index 00000000..f872743b --- /dev/null +++ b/tests/unit/fixtures/CCLW.document.i00000040.n0000.json @@ -0,0 +1,24 @@ +{ + "title": "Decree on the Types of Activities and Gases with a Greenhouse Effect ", + "slug": "decree-on-the-types-of-activities-and-gases-with-a-greenhouse-effect_ae49", + "md5_sum": null, + "url": "https://www.pravno-informacioni-sistem.rs/SlGlasnikPortal/eli/rep/sgrs/vlada/uredba/2022/13/1", + "content_type": "text/html", + "import_id": "CCLW.document.i00000040.n0000", + "language_variant": "Original Language", + "status": "PUBLISHED", + "metadata": { + "role": ["MAIN"], + "type": ["Plan"] + }, + "languages": ["eng"], + "events": [ + { + "import_id": "CPR.Event.21.0", + "title": "Published", + "date": "2019-12-25", + "type": "Passed/Approved", + "status": "OK" + } + ] +} diff --git a/tests/unit/fixtures/CCLW.document.i00000058.n0000.json b/tests/unit/fixtures/CCLW.document.i00000058.n0000.json new file mode 100644 index 00000000..33efe759 --- /dev/null +++ b/tests/unit/fixtures/CCLW.document.i00000058.n0000.json @@ -0,0 +1,24 @@ +{ + "title": "Circular Economy Development Program 2022-2024", + "slug": "circular-economy-development-program-2022-2024_46d2", + "md5_sum": null, + "url": "https://www.pravno-informacioni-sistem.rs/SlGlasnikPortal/eli/rep/sgrs/vlada/drugiakt/2022/137/1", + "content_type": "text/html", + "import_id": "CCLW.document.i00000058.n0000", + "language_variant": "Original Language", + "status": "PUBLISHED", + "metadata": { + "role": ["MAIN"], + "type": ["Plan"] + }, + "languages": ["eng"], + "events": [ + { + "import_id": "CPR.Event.22.0", + "title": "Published", + "date": "2019-12-25", + "type": "Passed/Approved", + "status": "OK" + } + ] +} diff --git a/tests/unit/fixtures/CCLW.document.i00000066.n0000.json b/tests/unit/fixtures/CCLW.document.i00000066.n0000.json new file mode 100644 index 00000000..9fb4b8a7 --- /dev/null +++ b/tests/unit/fixtures/CCLW.document.i00000066.n0000.json @@ -0,0 +1,24 @@ +{ + "title": "Commission Delegated Regulation (EU) 2019/807 of 13 March 2019 supplementing Directive (EU) 2018/2001 of the European Parliament and of the Council as regards the determination of high indirect land-use change-risk feedstock for which a significant expansion of the production area into land with high carbon stock is observed and the certification of low indirect land-use change-risk biofuels, bioliquids and biomass fuels", + "slug": "commission-delegated-regulation-eu-2019-807-of-13-march-2019-supplementing-directive-eu-2018-2001-of-the-european-parliament-and-of-the-council-as-regards-the-determination-of-high-indirect-land-use-change-risk-feedstock-for-which-a-significant-expansion-of-the-production-area-into-land-with-high-carbon-stock-is-observed-and-the-certification-of-low-indirect-land-use-change-risk-biofuels-bioliquids-and-biomass-fuels_3404", + "md5_sum": null, + "url": "https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=uriserv:OJ.L_.2019.133.01.0001.01.ENG&toc=OJ:L:2019:133:TOC|en", + "content_type": "text/html", + "import_id": "CCLW.document.i00000066.n0000", + "language_variant": "Original Language", + "status": "PUBLISHED", + "metadata": { + "role": ["MAIN"], + "type": ["Plan"] + }, + "languages": ["eng"], + "events": [ + { + "import_id": "CPR.Event.23.0", + "title": "Published", + "date": "2019-12-25", + "type": "Passed/Approved", + "status": "OK" + } + ] +} diff --git a/tests/unit/fixtures/CCLW.document.i00000067.n0000.json b/tests/unit/fixtures/CCLW.document.i00000067.n0000.json new file mode 100644 index 00000000..82165144 --- /dev/null +++ b/tests/unit/fixtures/CCLW.document.i00000067.n0000.json @@ -0,0 +1,24 @@ +{ + "title": "Directive (EU) 2018/2001 of the European Parliament and of the Council of 11 December 2018 on the promotion of the use of energy from renewable sources", + "slug": "directive-eu-2018-2001-of-the-european-parliament-and-of-the-council-of-11-december-2018-on-the-promotion-of-the-use-of-energy-from-renewable-sources_2173", + "md5_sum": null, + "url": "https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX%3A32018L2001|en", + "content_type": null, + "import_id": "CCLW.document.i00000067.n0000", + "language_variant": "Original Language", + "status": "PUBLISHED", + "metadata": { + "role": ["MAIN"], + "type": ["Plan"] + }, + "languages": ["eng"], + "events": [ + { + "import_id": "CPR.Event.24.0", + "title": "Published", + "date": "2019-12-25", + "type": "Passed/Approved", + "status": "OK" + } + ] +} diff --git a/tests/unit/fixtures/CCLW.document.i00000144.n0000.json b/tests/unit/fixtures/CCLW.document.i00000144.n0000.json new file mode 100644 index 00000000..94caded9 --- /dev/null +++ b/tests/unit/fixtures/CCLW.document.i00000144.n0000.json @@ -0,0 +1,24 @@ +{ + "title": "National Monetary Council (CNM) Resolution 4943/2021", + "slug": "national-monetary-council-cnm-resolution-4943-2021_6b15", + "md5_sum": null, + "url": "https://www.bcb.gov.br/estabilidadefinanceira/exibenormativo?tipo=Resolu%C3%A7%C3%A3o%20CMN&numero=4943", + "content_type": "text/html", + "import_id": "CCLW.document.i00000144.n0000", + "language_variant": "Original Language", + "status": "PUBLISHED", + "metadata": { + "role": ["MAIN"], + "type": ["Plan"] + }, + "languages": ["eng"], + "events": [ + { + "import_id": "CPR.Event.25.0", + "title": "Published", + "date": "2019-12-25", + "type": "Passed/Approved", + "status": "OK" + } + ] +} diff --git a/tests/unit/fixtures/CCLW.document.i00000153.n0000.json b/tests/unit/fixtures/CCLW.document.i00000153.n0000.json new file mode 100644 index 00000000..f34e0b76 --- /dev/null +++ b/tests/unit/fixtures/CCLW.document.i00000153.n0000.json @@ -0,0 +1,24 @@ +{ + "title": "BCB Resolution 139/2021", + "slug": "bcb-resolution-139-2021_84e8", + "md5_sum": null, + "url": "https://www.bcb.gov.br/estabilidadefinanceira/exibenormativo?tipo=Resolu%C3%A7%C3%A3o%20BCB&numero=139", + "content_type": "text/html", + "import_id": "CCLW.document.i00000153.n0000", + "language_variant": "Original Language", + "status": "PUBLISHED", + "metadata": { + "role": ["MAIN"], + "type": ["Plan"] + }, + "languages": ["eng"], + "events": [ + { + "import_id": "CPR.Event.26.0", + "title": "Published", + "date": "2019-12-25", + "type": "Passed/Approved", + "status": "OK" + } + ] +} diff --git a/tests/unit/fixtures/CCLW.document.i00000192.n0000.json b/tests/unit/fixtures/CCLW.document.i00000192.n0000.json new file mode 100644 index 00000000..c31bfcd5 --- /dev/null +++ b/tests/unit/fixtures/CCLW.document.i00000192.n0000.json @@ -0,0 +1,24 @@ +{ + "title": "Outline for Preparing Feasibility Study Reports for Enterprise Investment Projects", + "slug": "outline-for-preparing-feasibility-study-reports-for-enterprise-investment-projects_ff0c", + "md5_sum": "d3b3670071a51aaf4edec0ba2a26bd28", + "url": "https://www.ndrc.gov.cn/xxgk/zcfb/ghxwj/202304/P020230407401908613786.pdf", + "content_type": "application/pdf", + "import_id": "CCLW.document.i00000192.n0000", + "language_variant": "Original Language", + "status": "PUBLISHED", + "metadata": { + "role": ["MAIN"], + "type": ["Plan"] + }, + "languages": ["eng"], + "events": [ + { + "import_id": "CPR.Event.27.0", + "title": "Published", + "date": "2019-12-25", + "type": "Passed/Approved", + "status": "OK" + } + ] +} diff --git a/tests/unit/fixtures/CCLW.document.i00000204.n0000.json b/tests/unit/fixtures/CCLW.document.i00000204.n0000.json new file mode 100644 index 00000000..ca2376b9 --- /dev/null +++ b/tests/unit/fixtures/CCLW.document.i00000204.n0000.json @@ -0,0 +1,24 @@ +{ + "title": "Delivering 30by30 on land in England", + "slug": "delivering-30by30-on-land-in-england_4b97", + "md5_sum": "2f71b8bb629775fb8f3c47d70cc327ca", + "url": "https://assets.publishing.service.gov.uk/media/65807a5e23b70a000d234b5d/Delivering_30by30_on_land_in_England.pdf", + "content_type": "application/pdf", + "import_id": "CCLW.document.i00000204.n0000", + "language_variant": "Original Language", + "status": "PUBLISHED", + "metadata": { + "role": ["MAIN"], + "type": ["Plan"] + }, + "languages": ["eng"], + "events": [ + { + "import_id": "CPR.Event.28.0", + "title": "Published", + "date": "2019-12-25", + "type": "Passed/Approved", + "status": "OK" + } + ] +} diff --git a/tests/unit/fixtures/CCLW.document.i00000214.n0000.json b/tests/unit/fixtures/CCLW.document.i00000214.n0000.json new file mode 100644 index 00000000..c7779e9f --- /dev/null +++ b/tests/unit/fixtures/CCLW.document.i00000214.n0000.json @@ -0,0 +1,24 @@ +{ + "title": "Document title", + "slug": "regulation-on-ozone-depleting-substances_ff44", + "md5_sum": null, + "url": "https://faolex.fao.org/docs/pdf/mne204562.pdf", + "content_type": null, + "import_id": "CCLW.document.i00000214.n0000", + "language_variant": "Original Language", + "status": "PUBLISHED", + "metadata": { + "role": ["MAIN"], + "type": ["Plan"] + }, + "languages": ["eng"], + "events": [ + { + "import_id": "CPR.Event.29.0", + "title": "Published", + "date": "2019-12-25", + "type": "Passed/Approved", + "status": "OK" + } + ] +} diff --git a/tests/unit/fixtures/CCLW.document.i00000222.n0000.json b/tests/unit/fixtures/CCLW.document.i00000222.n0000.json new file mode 100644 index 00000000..5046b726 --- /dev/null +++ b/tests/unit/fixtures/CCLW.document.i00000222.n0000.json @@ -0,0 +1,24 @@ +{ + "title": "Azerbaijan 2030: National Policies for Socio-economic Development ", + "slug": "azerbaijan-2030-national-policies-for-socio-economic-development_6170", + "md5_sum": null, + "url": "https://president.az/en/articles/view/50474", + "content_type": "text/html", + "import_id": "CCLW.document.i00000222.n0000", + "language_variant": "Original Language", + "status": "PUBLISHED", + "metadata": { + "role": ["MAIN"], + "type": ["Plan"] + }, + "languages": ["eng"], + "events": [ + { + "import_id": "CPR.Event.30.0", + "title": "Published", + "date": "2019-12-25", + "type": "Passed/Approved", + "status": "OK" + } + ] +} diff --git a/tests/unit/fixtures/CCLW.document.i00000247.n0000.json b/tests/unit/fixtures/CCLW.document.i00000247.n0000.json new file mode 100644 index 00000000..27c67800 --- /dev/null +++ b/tests/unit/fixtures/CCLW.document.i00000247.n0000.json @@ -0,0 +1,24 @@ +{ + "title": "Law on the Efficient Use of Energy Sources and Energy Efficiency ", + "slug": "law-on-the-efficient-use-of-energy-sources-and-energy-efficiency_98da", + "md5_sum": null, + "url": "https://e-qanun.az/framework/48129", + "content_type": "text/html", + "import_id": "CCLW.document.i00000247.n0000", + "language_variant": "Original Language", + "status": "PUBLISHED", + "metadata": { + "role": ["MAIN"], + "type": ["Plan"] + }, + "languages": ["eng"], + "events": [ + { + "import_id": "CPR.Event.31.0", + "title": "Published", + "date": "2019-12-25", + "type": "Passed/Approved", + "status": "OK" + } + ] +} diff --git a/tests/unit/fixtures/CCLW.document.i00000280.n0000.json b/tests/unit/fixtures/CCLW.document.i00000280.n0000.json new file mode 100644 index 00000000..8bd4ecfb --- /dev/null +++ b/tests/unit/fixtures/CCLW.document.i00000280.n0000.json @@ -0,0 +1,24 @@ +{ + "title": "The Environment Decree of the Netherlands (Omgevingsbesluit)", + "slug": "the-environment-decree-of-the-netherlands-omgevingsbesluit_894d", + "md5_sum": null, + "url": "https://wetten.overheid.nl/BWBR0041278/2024-01-01", + "content_type": "text/html", + "import_id": "CCLW.document.i00000280.n0000", + "language_variant": "Original Language", + "status": "PUBLISHED", + "metadata": { + "role": ["MAIN"], + "type": ["Plan"] + }, + "languages": ["eng"], + "events": [ + { + "import_id": "CPR.Event.32.0", + "title": "Published", + "date": "2019-12-25", + "type": "Passed/Approved", + "status": "OK" + } + ] +} diff --git a/tests/unit/fixtures/CCLW.document.i00000287.n0000.json b/tests/unit/fixtures/CCLW.document.i00000287.n0000.json new file mode 100644 index 00000000..7168090d --- /dev/null +++ b/tests/unit/fixtures/CCLW.document.i00000287.n0000.json @@ -0,0 +1,24 @@ +{ + "title": "Published in Bulletin of Acts, Orders, and Decrees", + "slug": "published-in-bulletin-of-acts-orders-and-decrees_fbf2", + "md5_sum": "a2f4c4d5a3ad34b4aba9b84e15eacc8a", + "url": "https://zoek.officielebekendmakingen.nl/stb-2018-292.pdf", + "content_type": "application/pdf", + "import_id": "CCLW.document.i00000287.n0000", + "language_variant": "Original Language", + "status": "PUBLISHED", + "metadata": { + "role": ["MAIN"], + "type": ["Plan"] + }, + "languages": ["eng"], + "events": [ + { + "import_id": "CPR.Event.33.0", + "title": "Published", + "date": "2019-12-25", + "type": "Passed/Approved", + "status": "OK" + } + ] +} diff --git a/tests/unit/fixtures/CCLW.document.i00000290.n0000.json b/tests/unit/fixtures/CCLW.document.i00000290.n0000.json new file mode 100644 index 00000000..e2bbba72 --- /dev/null +++ b/tests/unit/fixtures/CCLW.document.i00000290.n0000.json @@ -0,0 +1,24 @@ +{ + "title": "The Environmental Activities Decree of the Netherlands (Besluit activiteiten leefomgeving, Bal)", + "slug": "the-environmental-activities-decree-of-the-netherlands-besluit-activiteiten-leefomgeving-bal_843e", + "md5_sum": null, + "url": "https://wetten.overheid.nl/BWBR0041330/2024-01-01", + "content_type": "text/html", + "import_id": "CCLW.document.i00000290.n0000", + "language_variant": "Original Language", + "status": "PUBLISHED", + "metadata": { + "role": ["MAIN"], + "type": ["Plan"] + }, + "languages": ["eng"], + "events": [ + { + "import_id": "CPR.Event.34.0", + "title": "Published", + "date": "2019-12-25", + "type": "Passed/Approved", + "status": "OK" + } + ] +} diff --git a/tests/unit/fixtures/CCLW.document.i00000291.n0000.json b/tests/unit/fixtures/CCLW.document.i00000291.n0000.json new file mode 100644 index 00000000..ba9fd94c --- /dev/null +++ b/tests/unit/fixtures/CCLW.document.i00000291.n0000.json @@ -0,0 +1,24 @@ +{ + "title": "Document title", + "slug": "the-environmental-activities-decree-of-the-netherlands-besluit-activiteiten-leefomgeving-bal_4235", + "md5_sum": null, + "url": "https://wetten.overheid.nl/BWBR0041330/2024-01-01", + "content_type": "text/html", + "import_id": "CCLW.document.i00000291.n0000", + "language_variant": "Original Language", + "status": "DELETED", + "metadata": { + "role": ["MAIN"], + "type": ["Plan"] + }, + "languages": ["eng"], + "events": [ + { + "import_id": "CPR.Event.35.0", + "title": "Published", + "date": "2019-12-25", + "type": "Passed/Approved", + "status": "OK" + } + ] +} diff --git a/tests/unit/fixtures/CCLW.document.i00000298.n0000.json b/tests/unit/fixtures/CCLW.document.i00000298.n0000.json new file mode 100644 index 00000000..be016971 --- /dev/null +++ b/tests/unit/fixtures/CCLW.document.i00000298.n0000.json @@ -0,0 +1,24 @@ +{ + "title": "The Environment Buildings Decree of the Netherlands (Besluit bouwwerken leefomgeving, Bbl)", + "slug": "the-environment-buildings-decree-of-the-netherlands-besluit-bouwwerken-leefomgeving-bbl_f2dd", + "md5_sum": null, + "url": "https://wetten.overheid.nl/BWBR0041297/2024-01-01", + "content_type": "text/html", + "import_id": "CCLW.document.i00000298.n0000", + "language_variant": "Original Language", + "status": "PUBLISHED", + "metadata": { + "role": ["MAIN"], + "type": ["Plan"] + }, + "languages": ["eng"], + "events": [ + { + "import_id": "CPR.Event.36.0", + "title": "Published", + "date": "2019-12-25", + "type": "Passed/Approved", + "status": "OK" + } + ] +} diff --git a/tests/unit/fixtures/CCLW.document.i00000305.n0000.json b/tests/unit/fixtures/CCLW.document.i00000305.n0000.json new file mode 100644 index 00000000..1bd13107 --- /dev/null +++ b/tests/unit/fixtures/CCLW.document.i00000305.n0000.json @@ -0,0 +1,24 @@ +{ + "title": "First publication of the Environment and Planning Act", + "slug": "first-publication-of-the-environment-and-planning-act_e3a0", + "md5_sum": "dc0e5ada0da61c2a0a27853fe7356711", + "url": "https://zoek.officielebekendmakingen.nl/stb-2016-156.pdf", + "content_type": "application/pdf", + "import_id": "CCLW.document.i00000305.n0000", + "language_variant": "Original Language", + "status": "PUBLISHED", + "metadata": { + "role": ["MAIN"], + "type": ["Plan"] + }, + "languages": ["eng"], + "events": [ + { + "import_id": "CPR.Event.37.0", + "title": "Published", + "date": "2019-12-25", + "type": "Passed/Approved", + "status": "OK" + } + ] +}