mirror of
https://github.com/scrapy/scrapy.git
synced 2025-02-23 15:43:47 +00:00
TST end-to-end test for LOG_LEVEL option
there were no end-to-end tests for this option
This commit is contained in:
parent
6eab59cbac
commit
e46572d6f2
@ -220,6 +220,12 @@ class MySpider(scrapy.Spider):
|
||||
self.assertIn("INFO: Closing spider (finished)", log)
|
||||
self.assertIn("INFO: Spider closed (finished)", log)
|
||||
|
||||
def test_runspider_log_level(self):
|
||||
log = self.get_log(self.debug_log_spider,
|
||||
args=('-s', 'LOG_LEVEL=INFO'))
|
||||
self.assertNotIn("DEBUG: It Works!", log)
|
||||
self.assertIn("INFO: Spider opened", log)
|
||||
|
||||
def test_runspider_no_spider_found(self):
|
||||
log = self.get_log("from scrapy.spiders import Spider\n")
|
||||
self.assertIn("No spider found in file", log)
|
||||
|
Loading…
x
Reference in New Issue
Block a user