Beispiel #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")
Beispiel #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')
Beispiel #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")
Beispiel #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')