Do not pop the crawler from the managed list

This commit is contained in:
Daniel Graña 2014-09-09 20:59:07 +00:00
parent 774aa9ee56
commit 99971dc8a8
1 changed files with 3 additions and 2 deletions

View File

@ -42,8 +42,9 @@ class CrawlerRunnerTest(unittest.TestCase):
self.crawler_runner.settings.setdict(project_settings,
priority='project')
yield self.crawler_runner.crawl(CustomSettingsSpider)
crawler = self.crawler_runner.crawlers.pop()
d = self.crawler_runner.crawl(CustomSettingsSpider)
crawler = list(self.crawler_runner.crawlers)[0]
yield d
self.assertEqual(crawler.settings.get('TEST1'), 'spider')
self.assertEqual(crawler.settings.get('TEST2'), 'spider')
self.assertEqual(crawler.settings.get('TEST3'), 'project')