From 7f7debbe0d5d5bbbe4182207137b651be100e408 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Wed, 16 Oct 2024 10:06:37 +0100 Subject: Fixes miss-named list view function --- engagements/tests/test_views.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'engagements/tests') diff --git a/engagements/tests/test_views.py b/engagements/tests/test_views.py index 01d73c7..a7a420b 100644 --- a/engagements/tests/test_views.py +++ b/engagements/tests/test_views.py @@ -19,6 +19,7 @@ def test_single_day_string(): duration_str = duration_formatter(d1, d2) assert duration_str == "10 October 2024 (1 day)" + def test_multi_duration_string(): """test date formatting for the summary box on the detail page""" d1 = datetime.date(2024, 10, 10) @@ -26,6 +27,7 @@ def test_multi_duration_string(): duration_str = duration_formatter(d1, d2) assert duration_str == "10-12 October 2024 (3 days)" + def test_multi_duration_string_longer(): """test date formatting for the summary box on the detail page""" d1 = datetime.date(2024, 10, 1) @@ -33,6 +35,7 @@ def test_multi_duration_string_longer(): duration_str = duration_formatter(d1, d2) assert duration_str == "01-12 October 2024 (12 days)" + def test_multi_duration_over_month_boundary_string(): """test date formatting for the summary box on the detail page""" d1 = datetime.date(2024, 9, 30) @@ -131,3 +134,9 @@ def test_create_engagement_strategy(client, user, org, regulatory_cycles): # Check that the response redirects (status code 302) after successful creation assert response.status_code == 302 assert EngagementStrategy.objects.count() == 1 + + +def test_org_list_page_exists(client): + url = reverse("engagements:org_detail") + response = client.get(url) + assert response.status_code == 302 -- cgit v1.2.3