Exemple #1
0
 def test_lux_assert_min_exceeded(self):
     """Test parsing of DPTLux with wrong value."""
     with pytest.raises(ConversionError):
         DPTLux.to_knx(-1)
Exemple #2
0
 def test_lux_settings(self):
     """Test attributes of DPTLux."""
     self.assertEqual(DPTLux().value_min, 0)
     self.assertEqual(DPTLux().value_max, 670760)
     self.assertEqual(DPTLux().unit, "lx")
     self.assertEqual(DPTLux().resolution, 1)