Skip to content

Commit

Permalink
Remove unnecessary class for a single test instance
Browse files Browse the repository at this point in the history
  • Loading branch information
mprpic committed Oct 25, 2024
1 parent 6f18918 commit 85cf6da
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -716,12 +716,11 @@ def test_show_org():
)


class TestSubcommandHelp:
def test_exit_on_help(self):
with mock.patch("cvelib.cli.CveApi.show_org") as show_org:
show_org.return_value = {}
runner = CliRunner()
result = runner.invoke(cli, ["org", "--help"])
assert result.exit_code == 0, result.output
# The command is named after the function that is called.
assert result.output.startswith("Usage: cli org")
def test_exit_on_help():
with mock.patch("cvelib.cli.CveApi.show_org") as show_org:
show_org.return_value = {}
runner = CliRunner()
result = runner.invoke(cli, ["org", "--help"])
assert result.exit_code == 0, result.output
# The command is named after the function that is called.
assert result.output.startswith("Usage: cli org")

0 comments on commit 85cf6da

Please sign in to comment.