def saveState(self): ''' Saves paths to configuration. ''' config.set(self._CONFIG_NAME, self._CONFIG_SECTION_LOCATIONS, "enabled", location.get(enabled=True)) config.set(self._CONFIG_NAME, self._CONFIG_SECTION_LOCATIONS, "disabled", location.get(enabled=False))
def testGetDisabled(self): location.add(_LOCATION_DIR, False) self.failUnless(_LOCATION_DIR in location.get()) self.failIf(_LOCATION_DIR in location.get(True))
def testGetEnabled(self): location.add(_LOCATION_DIR) self.failUnless(_LOCATION_DIR in location.get(True))
def testGet(self): location.add(_LOCATION_DIR) self.failUnless(_LOCATION_DIR in location.get())