Example #1
0
 def test_parse_calls_parse_on_table_parser(self, html_mock):
     table_parser_mock = MagicMock()
     parser = PageParser(table_parser=table_parser_mock, description_parser=None)
     parser.parse(page='irrelevant')
     self.assertTrue(table_parser_mock.parse.called)
Example #2
0
 def test_parse_calls_html_parse(self, html_mock):
     parser = PageParser(table_parser=MagicMock(), description_parser=None)
     parser.parse(page='irrelevant')
     self.assertTrue(html_mock.parse.called)
     html_mock.parse.assert_called_with(filename_or_url='irrelevant')