def test_to_knx_error(self): """Test to_knx function with wrong parametern.""" xknx = XKNX() remote_value = RemoteValueSceneNumber(xknx) with pytest.raises(ConversionError): remote_value.to_knx(100) with pytest.raises(ConversionError): remote_value.to_knx("100")
def test_to_knx(self): """Test to_knx function with normal operation.""" xknx = XKNX() remote_value = RemoteValueSceneNumber(xknx) assert remote_value.to_knx(11) == DPTArray((0x0A, ))
def test_to_knx(self): """Test to_knx function with normal operation.""" xknx = XKNX(loop=self.loop) remote_value = RemoteValueSceneNumber(xknx) self.assertEqual(remote_value.to_knx(11), DPTArray((0x0A, )))