Fixed pagination link error when <DIRECT_TEMPLATE_NAME>_SAVE_AS setting used.

The unit test for this scenario was passing as it was testing for an incorrect 'page_name' variable being set.
This commit is contained in:
nfletton 2013-02-09 17:23:59 -07:00 committed by Alexis Métaireau
commit 4a63695ae2
2 changed files with 3 additions and 3 deletions

View file

@ -259,8 +259,8 @@ class ArticlesGenerator(Generator):
continue
write(save_as, self.get_template(template),
self.context, blog=True, paginated=paginated,
page_name=template)
self.context, blog=True, paginated=paginated,
page_name=os.path.splitext(save_as)[0])
def generate_tags(self, write):
"""Generate Tags pages."""

View file

@ -140,7 +140,7 @@ class TestArticlesGenerator(unittest.TestCase):
generator.generate_direct_templates(write)
write.assert_called_with("archives/index.html",
generator.get_template("archives"), settings,
blog=True, paginated={}, page_name='archives')
blog=True, paginated={}, page_name='archives/index')
def test_direct_templates_save_as_false(self):