Add post_id to the metadata in test_importer

This commit is contained in:
carlcarl 2013-10-06 19:50:22 +08:00
commit 1621f6c8e7

View file

@ -32,7 +32,7 @@ class TestWordpressXmlImporter(unittest.TestCase):
def test_ignore_empty_posts(self):
self.assertTrue(self.posts)
for title, content, fname, date, author, categ, tags, kind, format in self.posts:
for title, content, fname, date, author, post_id, categ, tags, kind, format in self.posts:
self.assertTrue(title.strip())
def test_recognise_page_kind(self):
@ -40,7 +40,7 @@ class TestWordpressXmlImporter(unittest.TestCase):
self.assertTrue(self.posts)
# Collect (title, filename, kind) of non-empty posts recognised as page
pages_data = []
for title, content, fname, date, author, categ, tags, kind, format in self.posts:
for title, content, fname, date, author, post_id, categ, tags, kind, format in self.posts:
if kind == 'page':
pages_data.append((title, fname))
self.assertEqual(2, len(pages_data))