fix secondary demod; add same-value handling

This commit is contained in:
Jakob Ketterl
2020-03-24 00:18:10 +01:00
parent d5c2f8414e
commit cc5c130f49
3 changed files with 15 additions and 3 deletions

View File

@ -50,3 +50,11 @@ class PropertyLayerTest(TestCase):
mock.method.assert_not_called()
pm["testkey"] = "newvalue"
mock.method.assert_called_once_with("newvalue")
def testEventPreventedWhenValueUnchanged(self):
pm = PropertyLayer()
pm["testkey"] = "testvalue"
mock = Mock()
pm.wire(mock.method)
pm["testkey"] = "testvalue"
mock.method.assert_not_called()