From 8f8933d991fd5e9da1a22cc6e3d2beced83f6c7d Mon Sep 17 00:00:00 2001 From: Bruno Binet Date: Mon, 5 Mar 2012 23:48:18 +0100 Subject: [PATCH] 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 --- tests/test_contents.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_contents.py b/tests/test_contents.py index 9772fac5..1abb125d 100644 --- a/tests/test_contents.py +++ b/tests/test_contents.py @@ -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