From bc87d7d71bed6ae10466b1a594e9f98bfc1e659e Mon Sep 17 00:00:00 2001 From: James McKinney <26463+jpmckinney@users.noreply.github.com> Date: Wed, 6 Dec 2023 17:08:29 -0500 Subject: [PATCH] test: Add test for additional_closed_codelist_values codelist_url --- tests/test_basic.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/test_basic.py b/tests/test_basic.py index ea4627e..a407e3e 100644 --- a/tests/test_basic.py +++ b/tests/test_basic.py @@ -40,6 +40,15 @@ def test_codelist_url_extension_codelists(client): resp = client.get(data.get_absolute_url()) assert resp.status_code == 200 + assert len(resp.context["additional_closed_codelist_values"]) == 2 + assert ( + resp.context["additional_closed_codelist_values"]["projects/status"]["codelist_url"] + == "https://standard.open-contracting.org/infrastructure/latest/en/reference/codelists/#projectstatus" + ) + assert ( + resp.context["additional_closed_codelist_values"]["projects/type"]["codelist_url"] + == "https://standard.open-contracting.org/infrastructure/latest/en/reference/codelists/#projecttype" + ) assert len(resp.context["additional_open_codelist_values"]) == 1 assert ( resp.context["additional_open_codelist_values"]["projects/sector"]["codelist_url"]