add a test for force_store_value in read_only mode

This commit is contained in:
Emmanuel Garette 2013-04-23 19:01:03 +02:00
parent 2e21f13387
commit f0ef1734f4
1 changed files with 9 additions and 0 deletions

View File

@ -144,3 +144,12 @@ def test_force_store_value():
assert conf.getowner('wantref') == 'default' assert conf.getowner('wantref') == 'default'
conf.wantref conf.wantref
assert conf.getowner('wantref') == 'user' assert conf.getowner('wantref') == 'user'
def test_force_store_value_ro():
descr = make_description_freeze()
conf = Config(descr)
conf.read_only()
assert conf.getowner('wantref') == 'default'
conf.wantref
assert conf.getowner('wantref') == 'user'