def test_splitter_does_not_split_file_where_no_h1_tags(self): file_without_h1_tags = 'test_without_h1_tags.html' service = SplitterService(file_without_h1_tags, 'book without h1') result = service.split() h1tags = self.get_h1_tags(file_without_h1_tags) # result in this case returns a list with a single file self.assertEqual(len(result), len(h1tags) + 1)
def test_splitter_splits_given_html_file_by_h1_tags(self): service = SplitterService(self.html_file, 'book name') result = service.split() self.assertTrue(len(result) > 0)