summaryrefslogtreecommitdiffstats
path: root/test.py
diff options
context:
space:
mode:
Diffstat (limited to 'test.py')
-rw-r--r--test.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/test.py b/test.py
index 32c68c9..1d3560e 100644
--- a/test.py
+++ b/test.py
@@ -76,3 +76,21 @@ class FfsTest(TestCase):
assert 'lol' in lst1
del lst1['lol']
assert 'lol' not in lst1
+
+ def test_listSet(self):
+ rtr = Router(lulz=Router(cat=str))
+ lst1 = Dict(self.root, rtr)
+ assert 'lulz' not in lst1
+ lst1['lulz'] = {}
+ assert len(lst1['lulz']) == 0
+ assert isinstance(lst1['lulz'], Dict)
+ lst1['lulz'] = {'cat': "hello"}
+ assert len(lst1['lulz']) == 1
+ assert isinstance(lst1['lulz'], Dict)
+
+ lst1n = Dict(self.root, rtr)
+ assert lst1n['lulz']['cat'] == "hello"
+
+ lst1n['lulz'] = {}
+ assert 'cat' not in lst1['lulz']
+ assert 'cat' not in lst1n['lulz']