8
8
9
9
10
10
class dummy (object ):
11
- pass
11
+ default_lang = 'en'
12
12
13
13
14
14
class GetMetaTest (unittest .TestCase ):
@@ -26,7 +26,6 @@ def test_getting_metadata_from_content(self):
26
26
post = dummy ()
27
27
post .source_path = 'file_with_metadata'
28
28
post .metadata_path = 'file_with_metadata.meta'
29
- post .default_lang = 'en'
30
29
31
30
with mock .patch ('nikola.post.io.open' , opener_mock , create = True ):
32
31
meta , nsm = get_meta (post )
@@ -53,7 +52,6 @@ def test_get_title_from_rest(self):
53
52
post = dummy ()
54
53
post .source_path = 'file_with_metadata'
55
54
post .metadata_path = 'file_with_metadata.meta'
56
- post .default_lang = 'en'
57
55
58
56
with mock .patch ('nikola.post.io.open' , opener_mock , create = True ):
59
57
meta , nsm = get_meta (post )
@@ -78,7 +76,6 @@ def test_get_title_from_fname(self):
78
76
post = dummy ()
79
77
post .source_path = 'file_with_metadata'
80
78
post .metadata_path = 'file_with_metadata.meta'
81
- post .default_lang = 'en'
82
79
83
80
with mock .patch ('nikola.post.io.open' , opener_mock , create = True ):
84
81
meta , nsm = get_meta (post , 'file_with_metadata' )
@@ -104,7 +101,6 @@ def test_use_filename_as_slug_fallback(self):
104
101
post = dummy ()
105
102
post .source_path = 'Slugify this'
106
103
post .metadata_path = 'Slugify this.meta'
107
- post .default_lang = 'en'
108
104
109
105
with mock .patch ('nikola.post.io.open' , opener_mock , create = True ):
110
106
meta , nsm = get_meta (post , 'Slugify this' )
@@ -120,7 +116,6 @@ def test_extracting_metadata_from_filename(self):
120
116
post = dummy ()
121
117
post .source_path = '2013-01-23-the_slug-dubdubtitle.md'
122
118
post .metadata_path = '2013-01-23-the_slug-dubdubtitle.meta'
123
- post .default_lang = 'en'
124
119
with mock .patch ('nikola.post.io.open' , create = True ):
125
120
meta , _ = get_meta (
126
121
post ,
@@ -134,7 +129,6 @@ def test_get_meta_slug_only_from_filename(self):
134
129
post = dummy ()
135
130
post .source_path = 'some/path/the_slug.md'
136
131
post .metadata_path = 'some/path/the_slug.meta'
137
- post .default_lang = 'en'
138
132
with mock .patch ('nikola.post.io.open' , create = True ):
139
133
meta , _ = get_meta (post )
140
134
0 commit comments