Fix the @wrap_settings annotation

It seems much more useful if it only adds settings that are not already
set.
This commit is contained in:
mcarton
2015-08-17 15:46:29 +02:00
parent 4a2f869c6d
commit 88831c424f
3 changed files with 10 additions and 6 deletions
+3 -2
View File
@@ -11,6 +11,7 @@ def test_rules_names_list():
def test_update_settings():
settings = Settings({'key': 'val'})
new_settings = settings.update(key='new-val')
assert new_settings.key == 'new-val'
new_settings = settings.update(key='new-val', unset='unset-value')
assert new_settings.key == 'val'
assert new_settings.unset == 'unset-value'
assert settings.key == 'val'