def test_get_custom_defaults(self): with self.mocked_config(): settings = octoprint.settings.Settings() api_enabled = settings.getBoolean(["api", "enabled"], defaults=dict(api=dict(enabled=False))) self.assertFalse(api_enabled)
def test_get_custom_defaults(self): with self.settings() as settings: api_enabled = settings.getBoolean( ["api", "enabled"], defaults={"api": {"enabled": False}} ) self.assertFalse(api_enabled)