Skip to content

Commit

Permalink
#292 test run with --mock
Browse files Browse the repository at this point in the history
  • Loading branch information
hjacobs committed Sep 30, 2016
1 parent e8ffc95 commit 1f25b0d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,17 @@ def test_run_unimplemented_operations_and_stub(mock_app_run):
assert result.exit_code == 0


def test_run_unimplemented_operations_and_mock(mock_app_run):
runner = CliRunner()

spec_file = str(FIXTURES_FOLDER / 'missing_implementation/swagger.yaml')
with pytest.raises(ResolverError):
runner.invoke(main, ['run', spec_file], catch_exceptions=False)
# yet can be run with --stub option
result = runner.invoke(main, ['run', spec_file, '--mock=all'], catch_exceptions=False)
assert result.exit_code == 0


def test_run_with_wsgi_containers(mock_app_run, spec_file):
runner = CliRunner()

Expand Down

0 comments on commit 1f25b0d

Please sign in to comment.