Пример #1
0
def clear_lxd_version_check_cache():
    try:
        LxdVersion(clear_cache=True)
        yield
    finally:
        LxdVersion(clear_cache=True)
Пример #2
0
def test_valid_version(monkeypatch):
    patch_lxd_get_version(monkeypatch, '3.0.0+bingo')
    with mocked_executable('lxd', '/here/is/no/lxd'):
        with clear_lxd_version_check_cache():
            LxdVersion.check()