Пример #1
0
 def test_run_spider_using_week_timerange(self, popen):
     tasks.run_spider("rs_porto_alegre", timerange="past_week")
     command = [
         "scrapy", "crawl", "rs_porto_alegre", "-a", "start_date=2018-01-01"
     ]
     popen.assert_called_with(command, cwd="data_collection")
Пример #2
0
 def test_run_spider_using_week_timerange(self, popen):
     tasks.run_spider('rs_porto_alegre', timerange='past_week')
     command = [
         'scrapy', 'crawl', 'rs_porto_alegre', '-a', 'start_date=2018-01-01'
     ]
     popen.assert_called_with(command, cwd='data_collection')
Пример #3
0
 def test_run_spider(self, popen):
     tasks.run_spider("rs_porto_alegre")
     popen.assert_called_with(["scrapy", "crawl", "rs_porto_alegre"],
                              cwd="data_collection")
Пример #4
0
 def test_run_spider(self, popen):
     tasks.run_spider('rs_porto_alegre')
     popen.assert_called_with(['scrapy', 'crawl', 'rs_porto_alegre'],
                              cwd='data_collection')