Fix tests
This commit is contained in:
parent
d7a894bd80
commit
dfa9ce51a1
2 changed files with 4 additions and 3 deletions
|
@ -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):
|
||||||
|
|
|
@ -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',
|
||||||
|
|
Reference in a new issue