Beispiel #1
0
    def test_set_boolean_convert_any_false(self, value):
        with self.mocked_config():
            settings = octoprint.settings.Settings()

            settings.setBoolean(["api", "enabled"], value)

            self.assertEqual(False, settings._config["api"]["enabled"])
Beispiel #2
0
	def test_set_boolean_convert_any_false(self, value):
		with self.mocked_config():
			settings = octoprint.settings.Settings()

			settings.setBoolean(["api", "enabled"], value)

			self.assertEqual(False, settings._config["api"]["enabled"])
Beispiel #3
0
	def test_set_boolean_convert_string_true(self, value):
		with self.mocked_config():
			settings = octoprint.settings.Settings()

			settings.setBoolean(["devel", "virtualPrinter", "repetierStyleResends"], value)

			self.assertEqual(True, settings._config["devel"]["virtualPrinter"]["repetierStyleResends"])
Beispiel #4
0
	def test_set_boolean(self):
		with self.mocked_config():
			settings = octoprint.settings.Settings()

			settings.setBoolean(["devel", "virtualPrinter", "sendWait"], False)

			self.assertEqual(False, settings._config["devel"]["virtualPrinter"]["sendWait"])
Beispiel #5
0
	def test_set_boolean_convert_string_true(self, value):
		with self.mocked_config():
			settings = octoprint.settings.Settings()

			settings.setBoolean(["devel", "virtualPrinter", "repetierStyleResends"], value)

			self.assertEqual(True, settings._config["devel"]["virtualPrinter"]["repetierStyleResends"])
Beispiel #6
0
	def test_set_boolean(self):
		with self.mocked_config():
			settings = octoprint.settings.Settings()

			settings.setBoolean(["devel", "virtualPrinter", "sendWait"], False)

			self.assertEqual(False, settings._config["devel"]["virtualPrinter"]["sendWait"])
Beispiel #7
0
    def test_set_boolean_convert_any_false(self, value):
        with self.settings() as settings:
            settings.setBoolean(["api", "enabled"], value)

            self.assertEqual(False, settings._config["api"]["enabled"])
Beispiel #8
0
 def test_set_boolean(self):
     with self.settings() as settings:
         settings.setBoolean(["devel", "virtualPrinter", "sendWait"], False)
         self.assertEqual(
             False, settings._config["devel"]["virtualPrinter"]["sendWait"]
         )