Skip to content
Permalink
Browse files

Fixed some more typos and tests.

  • Loading branch information
felixfontein committed Jul 7, 2015
1 parent 0cae3cc commit 8892d080df6229ffbc08cfcfc55b74634693e4c2
Showing with 4 additions and 2 deletions.
  1. +2 −2 nikola/plugins/command/import_wordpress.py
  2. +2 −0 tests/test_command_import_wordpress.py
@@ -167,7 +167,7 @@ def _read_options(self, options, args):
self.import_empty_items = options.get('include_empty_items', False)

self.export_categories_as_categories = options.get('export_categories_as_categories', False)
self.read_comments = options.get('read_comments', False)
self.export_comments = options.get('export_comments', False)

self.auth = None
if options.get('download_auth') is not None:
@@ -710,7 +710,7 @@ def import_item(self, item, wordpress_namespace, out_folder=None):
out_folder, out_content_filename),
content)

if self.read_comments:
if self.export_comments:
comments = []
for tag in item.findall('{{{0}}}comment'.format(wordpress_namespace)):
comment = self._extract_comment(tag, wordpress_namespace)
@@ -194,6 +194,8 @@ def test_importing_posts_and_attachments(self):
self.import_command.output_folder = 'new_site'
self.import_command.squash_newlines = True
self.import_command.no_downloads = False
self.import_command.export_categories_as_categories = False
self.import_command.export_comments = False

# Ensuring clean results
self.import_command.url_map = {}

0 comments on commit 8892d08

Please sign in to comment.