Skip to content
Permalink
Browse files
Moving default_lang into dummy.
  • Loading branch information
felixfontein committed Mar 8, 2016
1 parent 0b98214 commit b35f8e1486f050d0b494c5b774860f5d3a76174b
Showing with 1 addition and 7 deletions.
  1. +1 −7 tests/test_utils.py
@@ -8,7 +8,7 @@


class dummy(object):
pass
default_lang = 'en'


class GetMetaTest(unittest.TestCase):
@@ -26,7 +26,6 @@ def test_getting_metadata_from_content(self):
post = dummy()
post.source_path = 'file_with_metadata'
post.metadata_path = 'file_with_metadata.meta'
post.default_lang = 'en'

with mock.patch('nikola.post.io.open', opener_mock, create=True):
meta, nsm = get_meta(post)
@@ -53,7 +52,6 @@ def test_get_title_from_rest(self):
post = dummy()
post.source_path = 'file_with_metadata'
post.metadata_path = 'file_with_metadata.meta'
post.default_lang = 'en'

with mock.patch('nikola.post.io.open', opener_mock, create=True):
meta, nsm = get_meta(post)
@@ -78,7 +76,6 @@ def test_get_title_from_fname(self):
post = dummy()
post.source_path = 'file_with_metadata'
post.metadata_path = 'file_with_metadata.meta'
post.default_lang = 'en'

with mock.patch('nikola.post.io.open', opener_mock, create=True):
meta, nsm = get_meta(post, 'file_with_metadata')
@@ -104,7 +101,6 @@ def test_use_filename_as_slug_fallback(self):
post = dummy()
post.source_path = 'Slugify this'
post.metadata_path = 'Slugify this.meta'
post.default_lang = 'en'

with mock.patch('nikola.post.io.open', opener_mock, create=True):
meta, nsm = get_meta(post, 'Slugify this')
@@ -120,7 +116,6 @@ def test_extracting_metadata_from_filename(self):
post = dummy()
post.source_path = '2013-01-23-the_slug-dubdubtitle.md'
post.metadata_path = '2013-01-23-the_slug-dubdubtitle.meta'
post.default_lang = 'en'
with mock.patch('nikola.post.io.open', create=True):
meta, _ = get_meta(
post,
@@ -134,7 +129,6 @@ def test_get_meta_slug_only_from_filename(self):
post = dummy()
post.source_path = 'some/path/the_slug.md'
post.metadata_path = 'some/path/the_slug.meta'
post.default_lang = 'en'
with mock.patch('nikola.post.io.open', create=True):
meta, _ = get_meta(post)

0 comments on commit b35f8e1

Please sign in to comment.