35003cbafb7074181b74c5e46ee8b56240c5c49e
[osm/N2VC.git] / tests / base.py
1 import subprocess
2
3 import pytest
4
5
6 def is_bootstrapped():
7 result = subprocess.run(['juju', 'switch'], stdout=subprocess.PIPE)
8 return (
9 result.returncode == 0 and
10 len(result.stdout.decode().strip()) > 0)
11
12 bootstrapped = pytest.mark.skipif(
13 not is_bootstrapped(),
14 reason='bootstrapped Juju environment required')