Don't set allowed_domains attribute in BaseSpider constructor

This commit is contained in:
Pablo Hoffman 2010-09-04 03:20:05 -03:00
parent 9f4b1e47a4
commit e3921ab016
2 changed files with 0 additions and 3 deletions

View File

@ -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

View File

@ -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"""