Exemplo n.º 1
0
 def test_dont_throw_on_non_content_file(self):
     path = 'some/path/chapter/topics/articleId/en.txt'
     parse_file_path(path)
Exemplo n.º 2
0
 def test_can_handle_titles_with_period(self):
     path = 'some/path/chapter/topics/articleId/en.article.name.with.periods.md'
     parsed_path = parse_file_path(path)
     self.assertEqual(parsed_path.title, 'article.name.with.periods')
Exemplo n.º 3
0
 def test_throw_if_filename_contains_empty_article_name(self):
     path = 'some/path/chapter/topics/articleId/en..md'
     with self.assertRaisesMessage(exceptions.ValidationError,
                                   'en..md: Invalid file name'):
         parse_file_path(path)
Exemplo n.º 4
0
 def setUp(self):
     self.path = 'some/path/chapter_6_education/topics/To_learn_english/fr.Apprendre l\'anglais.md'
     self.parsed_path = parse_file_path(self.path)