mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Merge pull request #394 from tbunnyman/issue#380
Small fix for nose tests
This commit is contained in:
commit
6521af5a13
1 changed files with 4 additions and 4 deletions
|
|
@ -98,11 +98,11 @@ class TestPageGenerator(unittest.TestCase):
|
||||||
"""
|
"""
|
||||||
Every time you want to test for a new field;
|
Every time you want to test for a new field;
|
||||||
Make sure the test pages in "TestPages" have all the fields
|
Make sure the test pages in "TestPages" have all the fields
|
||||||
Add it to distilled in distill_pages_for_test
|
Add it to distilled in distill_pages
|
||||||
Then update the assertItemsEqual in test_generate_context to match expected
|
Then update the assertItemsEqual in test_generate_context to match expected
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def distill_pages_for_test(self, pages):
|
def distill_pages(self, pages):
|
||||||
distilled = []
|
distilled = []
|
||||||
for page in pages:
|
for page in pages:
|
||||||
distilled.append([
|
distilled.append([
|
||||||
|
|
@ -120,8 +120,8 @@ class TestPageGenerator(unittest.TestCase):
|
||||||
_DEFAULT_CONFIG['THEME'], None,
|
_DEFAULT_CONFIG['THEME'], None,
|
||||||
_DEFAULT_CONFIG['MARKUP'])
|
_DEFAULT_CONFIG['MARKUP'])
|
||||||
generator.generate_context()
|
generator.generate_context()
|
||||||
pages = self.distill_pages_for_test(generator.pages)
|
pages = self.distill_pages(generator.pages)
|
||||||
hidden_pages = self.distill_pages_for_test(generator.hidden_pages)
|
hidden_pages = self.distill_pages(generator.hidden_pages)
|
||||||
|
|
||||||
pages_expected = [
|
pages_expected = [
|
||||||
[u'This is a test page', 'published'],
|
[u'This is a test page', 'published'],
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue