Skip to content
Merged
13 changes: 3 additions & 10 deletions tests/tests_app/core/test_lightning_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -1114,7 +1114,6 @@ class FlowValue(LightningFlow):
def __init__(self):
super().__init__()
self._value = None
self._has_found = False

@property
def value(self):
Expand All @@ -1125,19 +1124,13 @@ def value(self, value):
self._value = value

def run(self):
if self.value is None:
self.value = True

def __setattr__(self, name, value):
if name == "_value" and value is True:
self._has_found = True
super().__setattr__(name, value)
self.value = True


def test_lightning_flow_properties():
"""Validates setting properties to the LightningFlow properly calls property.fset."""

flow = FlowValue()
assert not flow._has_found
assert flow._value is None
flow.run()
assert flow._has_found
assert flow._value is True