mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Merge branch 'urls' of https://github.com/kylef/pelican
This commit is contained in:
commit
a7cea63db6
17 changed files with 229 additions and 114 deletions
|
|
@ -60,12 +60,12 @@ class TestPage(TestCase):
|
|||
"""
|
||||
# if a title is defined, save_as should be set
|
||||
page = Page(**self.page_kwargs)
|
||||
page.save_as = 'foo-bar.html'
|
||||
self.assertEqual(page.save_as, "pages/foo-bar.html")
|
||||
|
||||
# if a language is defined, save_as should include it accordingly
|
||||
self.page_kwargs['metadata'].update({'lang': 'fr', })
|
||||
page = Page(**self.page_kwargs)
|
||||
self.assertEqual(page.save_as, "foo-bar-fr.html")
|
||||
self.assertEqual(page.save_as, "pages/foo-bar-fr.html")
|
||||
|
||||
def test_datetime(self):
|
||||
"""If DATETIME is set to a tuple, it should be used to override LOCALE
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ def _filename(*args):
|
|||
class RstReaderTest(unittest2.TestCase):
|
||||
|
||||
def test_article_with_metadata(self):
|
||||
reader = readers.RstReader()
|
||||
reader = readers.RstReader({})
|
||||
content, metadata = reader.read(_filename('article_with_metadata.rst'))
|
||||
expected = {
|
||||
'category': 'yeah',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue