mirror of
https://github.com/ha7ilm/openwebrx.git
synced 2026-04-04 22:17:34 +00:00
handle deletions correctly
This commit is contained in:
parent
e0985c3802
commit
161408dbf4
2 changed files with 16 additions and 3 deletions
|
|
@ -215,3 +215,14 @@ class PropertyStackTest(TestCase):
|
|||
ps.wire(mock.method)
|
||||
del low_pm["testkey"]
|
||||
mock.method.assert_called_once_with({"testkey": PropertyDeleted})
|
||||
|
||||
def testChangeEventWhenKeyDeleted(self):
|
||||
ps = PropertyStack()
|
||||
low_pm = PropertyLayer(testkey="lowvalue")
|
||||
high_pm = PropertyLayer(testkey="highvalue")
|
||||
ps.addLayer(0, high_pm)
|
||||
ps.addLayer(1, low_pm)
|
||||
mock = Mock()
|
||||
ps.wire(mock.method)
|
||||
del high_pm["testkey"]
|
||||
mock.method.assert_called_once_with({"testkey": "lowvalue"})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue