From 9c6f05d5d27e594f5c011b2123924329abef5239 Mon Sep 17 00:00:00 2001 From: Haydn Greatnews Date: Mon, 22 Jul 2024 14:59:35 +1200 Subject: [PATCH] Remove test references to defunct PageIntro model --- cdhweb/events/tests/test_templates.py | 2 -- cdhweb/pages/tests/test_context_processors.py | 4 ---- cdhweb/people/tests/test_pages.py | 15 +-------------- cdhweb/projects/tests/test_templates.py | 2 +- docker/application/Dockerfile | 3 --- 5 files changed, 2 insertions(+), 24 deletions(-) delete mode 100644 cdhweb/pages/tests/test_context_processors.py diff --git a/cdhweb/events/tests/test_templates.py b/cdhweb/events/tests/test_templates.py index c151161f..1f89c2ea 100644 --- a/cdhweb/events/tests/test_templates.py +++ b/cdhweb/events/tests/test_templates.py @@ -3,8 +3,6 @@ from django.utils.timezone import localtime from pytest_django.asserts import assertContains, assertNotContains -from cdhweb.pages.models import PageIntro - class TestEventDetailTemplate: def test_event_title(self, client, workshop): diff --git a/cdhweb/pages/tests/test_context_processors.py b/cdhweb/pages/tests/test_context_processors.py deleted file mode 100644 index a0a18098..00000000 --- a/cdhweb/pages/tests/test_context_processors.py +++ /dev/null @@ -1,4 +0,0 @@ -import pytest -from wagtail.models import Page - -from cdhweb.pages.models import LinkPage, PageIntro diff --git a/cdhweb/people/tests/test_pages.py b/cdhweb/people/tests/test_pages.py index d05feca3..077e53a6 100644 --- a/cdhweb/people/tests/test_pages.py +++ b/cdhweb/people/tests/test_pages.py @@ -11,7 +11,7 @@ from wagtail.test.utils.form_data import rich_text from cdhweb.blog.models import Author, BlogPost -from cdhweb.pages.models import LinkPage, PageIntro +from cdhweb.pages.models import LinkPage from cdhweb.people.models import PeopleLandingPageArchived, Person, Profile @@ -119,16 +119,3 @@ def test_parent_pages(self): def test_child_pages(self): """no allowed children""" self.assertAllowedSubpageTypes(Profile, []) - - -@pytest.mark.django_db -class TestPageIntro: - def test_str(self): - root = Page.objects.get(title="Root") - link_page = LinkPage(title="Students") - root.add_child(instance=link_page) - intro = PageIntro.objects.create( - page=link_page, paragraph="

We have great students

" - ) - - assert str(intro) == link_page.title diff --git a/cdhweb/projects/tests/test_templates.py b/cdhweb/projects/tests/test_templates.py index 7769edeb..9a182343 100644 --- a/cdhweb/projects/tests/test_templates.py +++ b/cdhweb/projects/tests/test_templates.py @@ -3,7 +3,7 @@ from django.urls import reverse from pytest_django.asserts import assertContains, assertNotContains, assertTemplateUsed -from cdhweb.pages.models import LinkPage, PageIntro, RelatedLinkType +from cdhweb.pages.models import RelatedLinkType from cdhweb.pages.tests.conftest import to_streamfield_safe from cdhweb.projects.models import ProjectRelatedLink diff --git a/docker/application/Dockerfile b/docker/application/Dockerfile index f4aacf06..5aae02a0 100644 --- a/docker/application/Dockerfile +++ b/docker/application/Dockerfile @@ -29,9 +29,6 @@ RUN --mount=type=cache,target=/root/.cache/pip \ pip3 install -r docker/requirements.txt && \ pip3 install -r requirements/prod.txt - - - RUN adduser --system www -u 1000 && chown -R www /app