Commit 43856fdb authored by Matt Traudt's avatar Matt Traudt Committed by juga
Browse files

Add test that calls sbws init

parent ae7f5d8c
from tempfile import TemporaryFile
import subprocess
import os
def test_simple_init(tmpdir):
# out = None
err = None
with TemporaryFile('w+t') as stdout, TemporaryFile('w+t') as stderr:
retcode = subprocess.call(
'sbws -d {} --log-level debug init'.format(tmpdir).split(),
stdout=stdout, stderr=stderr)
stdout.seek(0, 0)
stderr.seek(0, 0)
# out = stdout.read()
err = stderr.read()
assert retcode == 0
assert len(err) == 0
conf_fname = os.path.join(str(tmpdir), 'config.ini')
assert os.path.exists(conf_fname)
with open(conf_fname, 'rt') as fd:
assert len(fd.read()) > 0
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment