def test_from_knx_invert(self): """Test from_knx function with normal operation.""" xknx = XKNX() remote_value = RemoteValueStep(xknx, invert=True) self.assertEqual(remote_value.from_knx(DPTBinary(1)), RemoteValueStep.Direction.DECREASE) self.assertEqual(remote_value.from_knx(DPTBinary(0)), RemoteValueStep.Direction.INCREASE)
def test_from_knx(self): """Test from_knx function with normal operation.""" xknx = XKNX() remote_value = RemoteValueStep(xknx) assert remote_value.from_knx( DPTBinary(1)) == RemoteValueStep.Direction.INCREASE assert remote_value.from_knx( DPTBinary(0)) == RemoteValueStep.Direction.DECREASE