tests: Add a yaml_config_stub fixture
This commit is contained in:
parent
d72691ee49
commit
c03ef10d54
@ -193,11 +193,15 @@ def configdata_init():
|
|||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def config_stub(stubs, monkeypatch, configdata_init, config_tmpdir):
|
def yaml_config_stub(config_tmpdir):
|
||||||
"""Fixture which provides a fake config object."""
|
"""Fixture which provides a YamlConfig object."""
|
||||||
yaml_config = configfiles.YamlConfig()
|
return configfiles.YamlConfig()
|
||||||
|
|
||||||
conf = config.Config(yaml_config=yaml_config)
|
|
||||||
|
@pytest.fixture
|
||||||
|
def config_stub(stubs, monkeypatch, configdata_init, yaml_config_stub):
|
||||||
|
"""Fixture which provides a fake config object."""
|
||||||
|
conf = config.Config(yaml_config=yaml_config_stub)
|
||||||
monkeypatch.setattr(config, 'instance', conf)
|
monkeypatch.setattr(config, 'instance', conf)
|
||||||
|
|
||||||
container = config.ConfigContainer(conf)
|
container = config.ConfigContainer(conf)
|
||||||
|
Loading…
Reference in New Issue
Block a user