Skip to content

Commit

Permalink
Merge pull request #142 from springload/fix/improve-tests
Browse files Browse the repository at this point in the history
Remove test references to defunct PageIntro model
  • Loading branch information
liamjohnston authored Jul 25, 2024
2 parents 4d088b4 + 9c6f05d commit 65385e8
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 24 deletions.
2 changes: 0 additions & 2 deletions cdhweb/events/tests/test_templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
4 changes: 0 additions & 4 deletions cdhweb/pages/tests/test_context_processors.py

This file was deleted.

15 changes: 1 addition & 14 deletions cdhweb/people/tests/test_pages.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down Expand Up @@ -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="<p>We have great students</p>"
)

assert str(intro) == link_page.title
2 changes: 1 addition & 1 deletion cdhweb/projects/tests/test_templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 0 additions & 3 deletions docker/application/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down

0 comments on commit 65385e8

Please sign in to comment.