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']
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'))
def test_getboolean(self): target = Config(extra_sources=('tests/test.conf', )) self.assertEqual(False, target.getboolean('debug'))