Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sebastian Schrader
Kea
Commits
25c802dd
Commit
25c802dd
authored
Nov 02, 2011
by
Jelte Jansen
Browse files
Merge branch 'trac1343'
parents
2182b30e
8b52836c
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/lib/python/isc/config/ccsession.py
View file @
25c802dd
...
...
@@ -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
))
...
...
src/lib/python/isc/config/tests/ccsession_test.py
View file @
25c802dd
...
...
@@ -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
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment