Esempio n. 1
0
	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)
Esempio n. 2
0
    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)
Esempio n. 3
0
	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)