Skip to content

Commit

Permalink
Add another trivial test
Browse files Browse the repository at this point in the history
  • Loading branch information
danpalmer committed Feb 15, 2018
1 parent 90325fc commit defdd8d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions routemaster/tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ def test_cli_with_invalid_config_fails(app_env):
assert result.exit_code == 1, result.output


def test_cli_with_unloadable_config_fails(app_env):
result = CliRunner(env=app_env).invoke(main, ['-c', 'test_data/not_yaml.json', 'validate'])
assert result.exit_code == 1, result.output


def test_cli_with_invalid_config_cannot_serve(app_env):
result = CliRunner(env=app_env).invoke(main, ['-c', 'test_data/disconnected.yaml', 'serve'])
assert result.exit_code == 1, result.output
3 changes: 3 additions & 0 deletions test_data/not_yaml.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"error": "This is literally not yaml"
}

0 comments on commit defdd8d

Please sign in to comment.