mirror of https://github.com/scrapy/scrapy.git
Don't set allowed_domains attribute in BaseSpider constructor
This commit is contained in:
parent
9f4b1e47a4
commit
e3921ab016
|
|
@ -26,8 +26,6 @@ class BaseSpider(object_ref):
|
|||
self.__dict__.update(kwargs)
|
||||
if not hasattr(self, 'start_urls'):
|
||||
self.start_urls = []
|
||||
if not hasattr(self, 'allowed_domains'):
|
||||
self.allowed_domains = []
|
||||
|
||||
def log(self, message, level=log.DEBUG):
|
||||
"""Log the given messages at the given log level. Always use this
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@ class BaseSpiderTest(unittest.TestCase):
|
|||
spider = self.spider_class("example.com")
|
||||
self.assertEqual(spider.name, 'example.com')
|
||||
self.assertEqual(spider.start_urls, [])
|
||||
self.assertEqual(spider.allowed_domains, [])
|
||||
|
||||
def test_spider_args(self):
|
||||
"""Constructor arguments are assigned to spider attributes"""
|
||||
|
|
|
|||
Loading…
Reference in New Issue