コード例 #1
0
 def test_create_crawler_mock(self, mock_crawler):
     create_crawler_object(self.spider, self.settings)
     mock_crawler.assert_called_with(self.settings)
コード例 #2
0
 def test_create_crawler_mock(self, mock_crawler):
     create_crawler_object(self.spider, self.settings)
     mock_crawler.assert_called_with(self.settings)
コード例 #3
0
 def test_create_crawler_object(self):
     crwlr = create_crawler_object(self.spider, self.settings)
     self.assertIsInstance(crwlr, Crawler)
コード例 #4
0
 def test_create_crawler_object(self):
     crwlr = create_crawler_object(self.spider, self.settings)
     self.assertIsInstance(crwlr, Crawler)
コード例 #5
0
 def test_create_crawler_mock(self):
     if SCRAPY_VERSION <= (1, 0, 0):
         with patch('arachne.scrapy_utils.Crawler') as mock_crawler:
             create_crawler_object(self.spider, self.settings)
             mock_crawler.assert_called_with(self.settings)
コード例 #6
0
 def test_create_crawler_object(self):
     if SCRAPY_VERSION <= (1, 0, 0):
         from scrapy.crawler import Crawler
         crwlr = create_crawler_object(self.spider, self.settings)
         self.assertIsInstance(crwlr, Crawler)
コード例 #7
0
ファイル: test_scrapy_utils.py プロジェクト: JallyHe/arachne
 def test_create_crawler_mock(self):
     if SCRAPY_VERSION <= (1, 0, 0):
         with patch('arachne.scrapy_utils.Crawler') as mock_crawler:
             create_crawler_object(self.spider, self.settings)
             mock_crawler.assert_called_with(self.settings)
コード例 #8
0
ファイル: test_scrapy_utils.py プロジェクト: JallyHe/arachne
 def test_create_crawler_object(self):
     if SCRAPY_VERSION <= (1, 0, 0):
         from scrapy.crawler import Crawler
         crwlr = create_crawler_object(self.spider, self.settings)
         self.assertIsInstance(crwlr, Crawler)