Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix some tests
  • Loading branch information
ralsina committed May 5, 2015
1 parent ee90115 commit 02bdaae
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/test_command_import_wordpress.py
Expand Up @@ -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)

Expand All @@ -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)
Expand Down

0 comments on commit 02bdaae

Please sign in to comment.