How to use the vaping.daemon.Vaping function in vaping

To help you get started, we’ve selected a few vaping examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github 20c / vaping / tests / test_daemon.py View on Github external
def test_config_dir_not_found():
    with pytest.raises(IOError) as excinfo:
        vaping.daemon.Vaping(config_dir="does/not/exist")
    assert 'config dir not found' in str(excinfo.value)
github 20c / vaping / tests / test_daemon.py View on Github external
def test_load_config_files(data_config_daemon):
    codec = munge.get_codec('yaml')()
    data = codec.loads(data_config_daemon.yml)
    data['vaping'] = dict(home_dir=os.path.realpath(data_config_daemon.path))
    daemon = vaping.daemon.Vaping(config=data)
    # print(data_config_daemon.dumps(daemon.config.data))
    data_config_daemon.expected["vaping"]["home_dir"] = os.path.realpath(data_config_daemon.expected["vaping"]["home_dir"])
    assert data_config_daemon.expected == daemon.config.data