mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
fix test test_save_as
ERROR: test_save_as (tests.test_contents.TestPage)
If a lang is not the default lang, save_as should be set
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/bruno/dev/pelican/tests/test_contents.py", line 63, in test_save_as
page.save_as = 'foo-bar.html'
AttributeError: can't set attribute
This commit is contained in:
parent
c2b8caed3f
commit
8f8933d991
1 changed files with 2 additions and 2 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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue