Add a test for Config._set_value without backend
This commit is contained in:
parent
13a8867e13
commit
e9b8288e4b
@ -603,6 +603,13 @@ class TestConfig:
|
|||||||
expected_message = 'Config option changed: tabs.show = never'
|
expected_message = 'Config option changed: tabs.show = never'
|
||||||
assert caplog.records[0].message == expected_message
|
assert caplog.records[0].message == expected_message
|
||||||
|
|
||||||
|
def test_set_value_no_backend(self, monkeypatch, conf):
|
||||||
|
"""Make sure setting values when the backend is still unknown works."""
|
||||||
|
monkeypatch.setattr(config.objects, 'backend', objects.NoBackend())
|
||||||
|
opt = conf.get_opt('tabs.show')
|
||||||
|
conf._set_value(opt, 'never')
|
||||||
|
assert conf._values['tabs.show'] == 'never'
|
||||||
|
|
||||||
def test_read_yaml(self, conf):
|
def test_read_yaml(self, conf):
|
||||||
assert not conf._yaml.loaded
|
assert not conf._yaml.loaded
|
||||||
conf._yaml.values['content.plugins'] = True
|
conf._yaml.values['content.plugins'] = True
|
||||||
|
Loading…
Reference in New Issue
Block a user