Пример #1
0
 def test_get_int_from_env(self):
     target = Config()
     debug = 'True'
     os.environ['SCRAPYDD_DEBUG'] = debug
     self.assertEqual(True, target.getboolean('debug'))
     del os.environ['SCRAPYDD_DEBUG']
Пример #2
0
 def test_get_bool_from_extrafiles(self):
     target = Config(extra_sources=('tests/test.conf',))
     self.assertEqual(False, target.getboolean('BoolSetting'))
     self.assertEqual(True, target.getboolean('BoolSettingTrue'))
Пример #3
0
 def test_getboolean(self):
     target = Config(extra_sources=('tests/test.conf', ))
     self.assertEqual(False, target.getboolean('debug'))