示例#1
0
 def testSetting3(self):
     from ec2.conf.defaults import nose_test
     conf = Settings(defaults=default_settings, )
     conf.enable(nose_test)
     tools.eq_('scrapybot2', conf.get('BOT_NAME', None))
     tools.eq_('11.0', conf.get('BOT_VERSION', None))
     tools.eq_(11.0, conf.getfloat('BOT_VERSION', None))
     tools.eq_([1, 2], conf.getlist('SPIDER_MODULES', None))
     tools.eq_(180, conf.getint('DOWNLOAD_TIMEOUT', None))
示例#2
0
 def testSetting3(self):
     from ec2.conf.defaults import nose_test
     conf = Settings(
         defaults = default_settings,
     )
     conf.enable(nose_test) 
     tools.eq_( 'scrapybot2', conf.get('BOT_NAME', None))
     tools.eq_( '11.0', conf.get('BOT_VERSION', None))
     tools.eq_( 11.0, conf.getfloat('BOT_VERSION', None))
     tools.eq_( [1,2], conf.getlist('SPIDER_MODULES', None))
     tools.eq_( 180, conf.getint('DOWNLOAD_TIMEOUT', None))