Skip to content
This repository has been archived by the owner on Apr 1, 2024. It is now read-only.

Commit

Permalink
Fixing tests
Browse files Browse the repository at this point in the history
Signed-off-by: Cédric Foellmi <cedric@onekiloparsec.dev>
  • Loading branch information
onekiloparsec committed May 6, 2020
1 parent 0ecddd0 commit 67646b5
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions tests/test_cli_options.py
@@ -1,26 +1,23 @@
import re
from click.testing import CliRunner
from oort import server
from oort import cli


def test_cli_version():
runner = CliRunner()
result = runner.invoke(server.main, ['-v'])
result = runner.invoke(cli.main, ['--version'])
assert result.exit_code == 0 and not result.exception
assert re.match('[0-9].[0-9].[0-9]', result.output)
result = runner.invoke(server.main, ['--version'])
assert result.exit_code == 0 and not result.exception
assert re.match('[0-9].[0-9].[0-9]', result.output)
result = runner.invoke(server.version)
result = runner.invoke(cli.version)
assert result.exit_code == 0 and not result.exception
assert re.match('[0-9].[0-9].[0-9]', result.output)


def test_cli_global_help():
runner = CliRunner()
result = runner.invoke(server.main, ['-h'])
result = runner.invoke(cli.main, ['-h'])
assert result.exit_code == 0 and not result.exception
assert 'Usage: main [OPTIONS] COMMAND [ARGS]' in result.output
result = runner.invoke(server.main, ['--help'])
result = runner.invoke(cli.main, ['--help'])
assert result.exit_code == 0 and not result.exception
assert 'Usage: main [OPTIONS] COMMAND [ARGS]' in result.output

0 comments on commit 67646b5

Please sign in to comment.