Added some slightly better tests utilizing clirunner

This commit is contained in:
Alex Kelly 2021-08-18 19:40:21 -04:00
parent e0c86483e4
commit c7c40e1f7d

View file

@ -1,12 +1,22 @@
import pytest
from task_status.task_status import main as task_main
from task_status.task_status import __version__ as task_version
from click.testing import CliRunner
def test_task():
assert True
runner = CliRunner()
def test_main():
if task_main:
assert True
response = runner.invoke(task_main)
assert response.exit_code == 0
def test_version():
response = runner.invoke(task_main, ["--version"])
assert response.exit_code == 0
assert task_version in response.output
def test_uuid():
response = runner.invoke(task_main, ["--uuid"])
assert response.exit_code == 0