mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Fix test_direct_templates_save_as_false test case
A non-existent asserts_called_count attr was used which would always succeed, silently hiding the error.
This commit is contained in:
parent
8fe05bb599
commit
40c9406ca4
1 changed files with 2 additions and 2 deletions
|
|
@ -198,14 +198,14 @@ class TestArticlesGenerator(unittest.TestCase):
|
|||
|
||||
settings = get_settings()
|
||||
settings['DIRECT_TEMPLATES'] = ['archives']
|
||||
settings['ARCHIVES_SAVE_AS'] = 'archives/index.html'
|
||||
settings['ARCHIVES_SAVE_AS'] = False
|
||||
settings['CACHE_PATH'] = self.temp_cache
|
||||
generator = ArticlesGenerator(
|
||||
context=settings, settings=settings,
|
||||
path=None, theme=settings['THEME'], output_path=None)
|
||||
write = MagicMock()
|
||||
generator.generate_direct_templates(write)
|
||||
write.assert_called_count == 0
|
||||
self.assertEqual(write.call_count, 0)
|
||||
|
||||
def test_per_article_template(self):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue