aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/cli/cmd_project_test.py18
-rw-r--r--tests/unit/cli/options_test.py4
2 files changed, 18 insertions, 4 deletions
diff --git a/tests/unit/cli/cmd_project_test.py b/tests/unit/cli/cmd_project_test.py
index 8b9216fa..102e9ed7 100644
--- a/tests/unit/cli/cmd_project_test.py
+++ b/tests/unit/cli/cmd_project_test.py
@@ -21,17 +21,35 @@ def runner():
def test_run(mocker, runner):
mocker.patch('os.system')
+ runner.invoke(cli, ['run'])
+ os.system.assert_called_once_with('ansible-playbook run.yml')
+
+
+def test_run_verbose(mocker, runner):
+ mocker.patch('os.system')
runner.invoke(cli, ['run', '-vvv'])
os.system.assert_called_once_with('ansible-playbook run.yml -vvv')
def test_setup(mocker, runner):
mocker.patch('os.system')
+ runner.invoke(cli, ['setup'])
+ os.system.assert_called_once_with('ansible-playbook setup.yml')
+
+
+def test_setup_verbose(mocker, runner):
+ mocker.patch('os.system')
runner.invoke(cli, ['setup', '-vvv'])
os.system.assert_called_once_with('ansible-playbook setup.yml -vvv')
def test_teardown(mocker, runner):
mocker.patch('os.system')
+ runner.invoke(cli, ['teardown'])
+ os.system.assert_called_once_with('ansible-playbook teardown.yml')
+
+
+def test_teardown_verbose(mocker, runner):
+ mocker.patch('os.system')
runner.invoke(cli, ['teardown', '-vvv'])
os.system.assert_called_once_with('ansible-playbook teardown.yml -vvv')
diff --git a/tests/unit/cli/options_test.py b/tests/unit/cli/options_test.py
index d7c0f700..6aef139c 100644
--- a/tests/unit/cli/options_test.py
+++ b/tests/unit/cli/options_test.py
@@ -21,10 +21,6 @@ class TestClass(object):
def runner(self):
return CliRunner()
- def test_verbose(self, runner):
- result = runner.invoke(cli, ['-v'])
- assert result.output == ''
-
def test_version(self, runner):
result = runner.invoke(cli, ['--version'])
assert re.search(r'\d+\.\d+\.\d+', result.output)