Skip to content
Permalink
Browse files

fix some tests

  • Loading branch information
ralsina committed May 5, 2015
1 parent ee90115 commit 02bdaae4411ed7d8968cb0f9f23c42ba7f99990a
Showing with 4 additions and 4 deletions.
  1. +4 −4 tests/test_command_import_wordpress.py
@@ -302,16 +302,16 @@ def test_importing_posts_and_attachments(self):

def test_transforming_content(self):
"""Applying markup conversions to content."""
transform_sourcecode = mock.MagicMock()
transform_code = mock.MagicMock()
transform_caption = mock.MagicMock()
transform_newlines = mock.MagicMock()

with mock.patch('nikola.plugins.command.import_wordpress.CommandImportWordpress.transform_sourcecode', transform_sourcecode):
with mock.patch('nikola.plugins.command.import_wordpress.CommandImportWordpress.transform_code', transform_code):
with mock.patch('nikola.plugins.command.import_wordpress.CommandImportWordpress.transform_caption', transform_caption):
with mock.patch('nikola.plugins.command.import_wordpress.CommandImportWordpress.transform_multiple_newlines', transform_newlines):
self.import_command.transform_content("random content")

self.assertTrue(transform_sourcecode.called)
self.assertTrue(transform_code.called)
self.assertTrue(transform_caption.called)
self.assertTrue(transform_newlines.called)

@@ -325,7 +325,7 @@ def test_transforming_source_code(self):
print sys.version
[/sourcecode]"""

content = self.import_command.transform_sourcecode(content)
content = self.import_command.transform_code(content)

self.assertFalse('[/sourcecode]' in content)
self.assertFalse('[sourcecode language=' in content)

0 comments on commit 02bdaae

Please sign in to comment.
You can’t perform that action at this time.