Make sure Content uses URLWrappers

This commit is contained in:
Deniz Turgut 2015-02-17 20:05:00 -05:00
commit 3ea4542015
5 changed files with 47 additions and 18 deletions

View file

@ -5,7 +5,7 @@ import locale
from pelican.tests.support import unittest, get_settings
from pelican.paginator import Paginator
from pelican.contents import Article
from pelican.contents import Article, Author
from pelican.settings import DEFAULT_CONFIG
from jinja2.utils import generate_lorem_ipsum
@ -26,7 +26,6 @@ class TestPage(unittest.TestCase):
'metadata': {
'summary': TEST_SUMMARY,
'title': 'foo bar',
'author': 'Blogger',
},
'source_path': '/path/to/file/foo.ext'
}
@ -49,6 +48,7 @@ class TestPage(unittest.TestCase):
key=lambda r: r[0],
)
self.page_kwargs['metadata']['author'] = Author('Blogger', settings)
object_list = [Article(**self.page_kwargs), Article(**self.page_kwargs)]
paginator = Paginator('foobar.foo', object_list, settings)
page = paginator.page(1)