1
Fork 0

Fix tests

This commit is contained in:
Jake Howard 2018-08-03 22:36:58 +01:00
parent d7a894bd80
commit dfa9ce51a1
Signed by: jake
GPG Key ID: 57AFB45680EDD477
2 changed files with 4 additions and 3 deletions

View File

@ -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):

View File

@ -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',