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 wagtail.search import index
from project.common.models import Entity from project.common.models import Entity
from django.db import models from django.db import models
from wagtail.contrib.routable_page.models import RoutablePageMixin, route
from modelcluster.fields import ParentalKey from modelcluster.fields import ParentalKey
from modelcluster.contrib.taggit import ClusterTaggableManager from modelcluster.contrib.taggit import ClusterTaggableManager
from taggit.models import TaggedItemBase, Tag from taggit.models import TaggedItemBase
class BlogPageTag(TaggedItemBase): class BlogPageTag(TaggedItemBase):

View file

@ -29,7 +29,8 @@ class BaseTestCase(WagtailPageTests):
'body-0-order': 0, 'body-0-order': 0,
'body-0-type': 'raw_html', 'body-0-type': 'raw_html',
'body-0-value': data['body'], '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) return self.client.post(add_url, data)
@ -53,6 +54,7 @@ class BaseTestCase(WagtailPageTests):
# Create a new homepage # Create a new homepage
homepage = HomePage.objects.create( homepage = HomePage.objects.create(
title="Homepage", title="Homepage",
subtitle="Homepage",
body="Home Page", body="Home Page",
slug='home', slug='home',
path='00010001', path='00010001',