Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
The Tor Project
Network Health
sbws
Commits
43856fdb
Commit
43856fdb
authored
Jul 04, 2018
by
Matt Traudt
Committed by
juga
Jul 05, 2018
Browse files
Add test that calls sbws init
parent
ae7f5d8c
Changes
1
Show whitespace changes
Inline
Side-by-side
tests/integration/test_sbws.py
0 → 100644
View file @
43856fdb
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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment