def test_parser_should_parse_data_only_once(self, parse):
     parse.return_value = static_content_parsed()
     self.parser.process_nodes()
     self.parser.get_nodes()
     self.parser.process_nodes()
     self.parser.get_nodes()
     parse.assert_called_once_with('http://mocked.source/')
 def setUp(self):
     self.selector = SelectorMock()
     self.static_content_mock = StaticContentMock()
     self.static_content_mock.selector_set.all = Mock(
         return_value=[self.selector])
     self.parser = StaticContentParser(self.static_content_mock)
     self.parser.data = static_content_parsed()
 def test_parser_should_collect_data_during_get_nodes(self, parse):
     parse.return_value = static_content_parsed()
     self.parser.get_nodes()
     parse.assert_called_once_with('http://mocked.source/')