Skip to content

Commit

Permalink
Update init test to check file was created
Browse files Browse the repository at this point in the history
  • Loading branch information
phlax committed Jul 4, 2017
1 parent a94a784 commit 97e3126
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/commands/pootle_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# or later license. See the LICENSE file for a copy of the license and the
# AUTHORS file for copyright and authorship information.

import os
from subprocess import call

import pytest
Expand Down Expand Up @@ -46,9 +47,9 @@ def test_pootle_init(capfd):


@pytest.mark.cmd
def test_pootle_init_db_sqlite(capfd, tmpdir):
def test_pootle_init_db_sqlite(capsys, tmpdir):
"""pootle init --help"""
test_conf_file = tmpdir.join("pootle.conf")
assert not os.path.exists(str(test_conf_file))
call(['pootle', 'init', '--db=sqlite', '--config=%s' % test_conf_file])
out, err = capfd.readouterr()
assert "Configuration file created" in out
assert os.path.exists(str(test_conf_file))

0 comments on commit 97e3126

Please sign in to comment.