def test_get_float_invalid(self):
        with self.mocked_config():
            settings = octoprint.settings.Settings()

            value = settings.getFloat(["server", "host"])

            self.assertIsNone(value)
    def test_get_float_converted(self):
        with self.mocked_config():
            settings = octoprint.settings.Settings()

            value = settings.getFloat(["serial", "timeout", "connection"])

            self.assertEqual(5.0, value)
Exemple #3
0
	def test_get_float_invalid(self):
		with self.mocked_config():
			settings = octoprint.settings.Settings()

			value = settings.getFloat(["server", "host"])

			self.assertIsNone(value)
Exemple #4
0
	def test_get_float_converted(self):
		with self.mocked_config():
			settings = octoprint.settings.Settings()

			value = settings.getFloat(["serial", "timeout", "connection"])

			self.assertEqual(5.0, value)
Exemple #5
0
 def test_get_float_invalid(self):
     with self.settings() as settings:
         value = settings.getFloat(["server", "host"])
         self.assertIsNone(value)
Exemple #6
0
 def test_get_float_converted(self):
     with self.settings() as settings:
         value = settings.getFloat(["serial", "timeout", "connection"])
         self.assertEqual(5.0, value)