2022-05-13 17:42:42 +00:00
|
|
|
"""Test cases for the __main__ module."""
|
|
|
|
import pytest
|
|
|
|
from click.testing import CliRunner
|
2022-11-18 21:45:44 +00:00
|
|
|
|
2022-06-01 15:17:25 +00:00
|
|
|
from spiffworkflow_backend import __main__
|
2022-05-13 17:42:42 +00:00
|
|
|
|
|
|
|
|
|
|
|
@pytest.fixture
|
|
|
|
def runner() -> CliRunner:
|
|
|
|
"""Fixture for invoking command-line interfaces."""
|
|
|
|
return CliRunner()
|
|
|
|
|
|
|
|
|
|
|
|
def test_main_succeeds(runner: CliRunner) -> None:
|
|
|
|
"""It exits with a status code of zero."""
|
|
|
|
result = runner.invoke(__main__.main)
|
|
|
|
assert result.exit_code == 0
|