コード例 #1
0
 def setUp(self):
     mock_config = mock_factory.create_mock_config()
     mock_item_queue = mock.create_autospec(queue).return_value
     mock_item_writer = mock.create_autospec(ItemWriter).return_value
     self.item_processor = ItemProcessor(mock_config, mock_item_queue)
     self.item_processor.item_writer = mock_item_writer
     self.item_processor.no_items_received = True
コード例 #2
0
 def setUp(self):
     mock_config = mock_factory.create_mock_config()
     mock_page_queue = mock.create_autospec(queue).return_value
     mock_item_queue = mock.create_autospec(queue).return_value
     request_sender = mock.create_autospec(RequestSender).return_value
     self.page_processor = PageProcessor(mock_config, mock_page_queue,
                                         mock_item_queue, request_sender)
コード例 #3
0
 def setUp(self):
     mock_config = mock_factory.create_mock_config()
     page_queue = mock.create_autospec(queue).return_value
     item_queue = mock.create_autospec(queue).return_value
     thread_factory = mock.create_autospec(ThreadFactory).return_value
     self.work_executor = WorkExecutor(mock_config, page_queue, item_queue, thread_factory)
     self.work_executor.item_processor = mock.create_autospec(ItemProcessor).return_value
コード例 #4
0
 def setUp(self):
     mock_config = mock_factory.create_mock_config()
     page_queue = mock.create_autospec(queue).return_value
     item_queue = mock.create_autospec(queue).return_value
     thread_factory = mock.create_autospec(ThreadFactory).return_value
     self.work_executor = WorkExecutor(mock_config, page_queue, item_queue,
                                       thread_factory)
     self.work_executor.item_processor = mock.create_autospec(
         ItemProcessor).return_value
コード例 #5
0
 def setUp(self):
     mock_config = mock_factory.create_mock_config()
     mock_page_queue = mock.create_autospec(queue).return_value
     mock_item_queue = mock.create_autospec(queue).return_value
     request_sender = mock.create_autospec(RequestSender).return_value
     self.page_processor = PageProcessor(mock_config, mock_page_queue, mock_item_queue, request_sender)