From dfa9ce51a1c7bdf82cc39cf6366320a588635291 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Fri, 3 Aug 2018 22:36:58 +0100 Subject: [PATCH] Fix tests --- project/blog/models.py | 3 +-- project/common/tests.py | 4 +++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/project/blog/models.py b/project/blog/models.py index 4264fea..01c9043 100644 --- a/project/blog/models.py +++ b/project/blog/models.py @@ -3,10 +3,9 @@ from wagtail.admin.edit_handlers import StreamFieldPanel, FieldPanel from wagtail.search import index from project.common.models import Entity from django.db import models -from wagtail.contrib.routable_page.models import RoutablePageMixin, route from modelcluster.fields import ParentalKey from modelcluster.contrib.taggit import ClusterTaggableManager -from taggit.models import TaggedItemBase, Tag +from taggit.models import TaggedItemBase class BlogPageTag(TaggedItemBase): diff --git a/project/common/tests.py b/project/common/tests.py index 5447e37..c860c18 100644 --- a/project/common/tests.py +++ b/project/common/tests.py @@ -29,7 +29,8 @@ class BaseTestCase(WagtailPageTests): 'body-0-order': 0, 'body-0-type': 'raw_html', 'body-0-value': data['body'], - 'slug': slugify(data['title']) + 'slug': slugify(data['title']), + 'subtitle': data.get('subtitle', data['title'] + ' subtitle') }) return self.client.post(add_url, data) @@ -53,6 +54,7 @@ class BaseTestCase(WagtailPageTests): # Create a new homepage homepage = HomePage.objects.create( title="Homepage", + subtitle="Homepage", body="Home Page", slug='home', path='00010001',