Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Moving default_lang into dummy.
  • Loading branch information
felixfontein committed Mar 8, 2016
1 parent 0b98214 commit b35f8e1
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions tests/test_utils.py
Expand Up @@ -8,7 +8,7 @@


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


class GetMetaTest(unittest.TestCase):
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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')
Expand All @@ -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')
Expand All @@ -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,
Expand All @@ -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)

Expand Down

0 comments on commit b35f8e1

Please sign in to comment.