Commit 25c802dd authored by Jelte Jansen's avatar Jelte Jansen
Browse files

Merge branch 'trac1343'

parents 2182b30e 8b52836c
......@@ -543,6 +543,7 @@ class UIModuleCCSession(MultiConfigData):
cur_map = {}
if value in cur_map:
del cur_map[value]
self.set_value(identifier, cur_map)
else:
raise isc.cc.data.DataNotFoundError(value + " not found in named_set " + str(identifier))
......
......@@ -756,6 +756,17 @@ class TestUIModuleCCSession(unittest.TestCase):
uccs = self.create_uccs_named_set(fake_conn)
value, status = uccs.get_value("/Spec32/named_set_item")
self.assertEqual({'a': 1, 'b': 2}, value)
# make sure that removing from default actually removes it
uccs.remove_value("/Spec32/named_set_item", "a")
value, status = uccs.get_value("/Spec32/named_set_item")
self.assertEqual({'b': 2}, value)
self.assertEqual(uccs.LOCAL, status)
# ok, put it back now
uccs.add_value("/Spec32/named_set_item", "a")
uccs.set_value("/Spec32/named_set_item/a", 1)
uccs.add_value("/Spec32/named_set_item", "foo")
value, status = uccs.get_value("/Spec32/named_set_item")
self.assertEqual({'a': 1, 'b': 2, 'foo': 3}, value)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment