diff --git a/owrx/property/__init__.py b/owrx/property/__init__.py index 6c9d76df..7cc84f64 100644 --- a/owrx/property/__init__.py +++ b/owrx/property/__init__.py @@ -11,7 +11,8 @@ class PropertyError(Exception): class PropertyDeletion(object): - pass + def __bool__(self): + return False # a special object that will be sent in events when a deletion occured diff --git a/test/property/test_property_deletion.py b/test/property/test_property_deletion.py new file mode 100644 index 00000000..b68cf08a --- /dev/null +++ b/test/property/test_property_deletion.py @@ -0,0 +1,8 @@ +from unittest import TestCase +from owrx.property import PropertyDeletion + + +class PropertyDeletionTest(TestCase): + def testDeletionEvaluatesToFalse(self): + deletion = PropertyDeletion() + self.assertFalse(deletion)