22 lines
489 B
Python
22 lines
489 B
Python
"""Tests for the Python CLI scaffold."""
|
|
|
|
import json
|
|
|
|
from click.testing import CliRunner
|
|
|
|
from mxgateway import __version__
|
|
from mxgateway_cli.commands import main
|
|
|
|
|
|
def test_version_json_is_deterministic() -> None:
|
|
runner = CliRunner()
|
|
|
|
result = runner.invoke(main, ["version", "--json"])
|
|
|
|
assert result.exit_code == 0
|
|
assert json.loads(result.output) == {
|
|
"client": "mxgw-py",
|
|
"package": "mxaccess-gateway-client",
|
|
"version": __version__,
|
|
}
|