Skip to content

Commit

Permalink
Fix CVE states
Browse files Browse the repository at this point in the history
  • Loading branch information
gthess committed Oct 18, 2021
1 parent 2ca28c3 commit 8f0967e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cvelib/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ def show_cve(ctx, print_raw, cve_id):
@click.option("--year", callback=validate_year, help="Filter by year.")
@click.option(
"--state",
type=click.Choice(["reserved", "public", "reject"], case_sensitive=False),
type=click.Choice(["reserved", "published", "rejected"], case_sensitive=False),
help="Filter by reservation state.",
)
@click.option(
Expand Down
12 changes: 6 additions & 6 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def test_cve_list():
"owning_cna": "acme",
"requested_by": {"cna": "acme", "user": "ann"},
"reserved": "2021-01-14T18:32:57.955Z",
"state": "PUBLIC",
"state": "PUBLISHED",
"time": {
"created": "2021-01-14T18:32:57.956Z",
"modified": "2021-01-14T18:32:57.956Z",
Expand All @@ -63,7 +63,7 @@ def test_cve_list():
"owning_cna": "acme",
"requested_by": {"cna": "corp", "user": "eve"},
"reserved": "2021-01-14T18:34:50.916Z",
"state": "REJECT",
"state": "REJECTED",
"time": {
"created": "2021-01-14T18:34:50.917Z",
"modified": "2021-01-14T18:34:50.917Z",
Expand All @@ -76,10 +76,10 @@ def test_cve_list():
result = runner.invoke(cli, DEFAULT_OPTS + ["list"])
assert result.exit_code == 0, result.output
assert result.output == (
"CVE ID STATE OWNING CNA REQUESTED BY RESERVED\n"
"CVE-2021-3001 RESERVED acme bob (acme) Thu Jan 14 18:32:19 2021\n"
"CVE-2021-3002 PUBLIC acme ann (acme) Thu Jan 14 18:32:57 2021\n"
"CVE-2021-3003 REJECT acme eve (corp) Thu Jan 14 18:34:50 2021\n"
"CVE ID STATE OWNING CNA REQUESTED BY RESERVED\n"
"CVE-2021-3001 RESERVED acme bob (acme) Thu Jan 14 18:32:19 2021\n"
"CVE-2021-3002 PUBLISHED acme ann (acme) Thu Jan 14 18:32:57 2021\n"
"CVE-2021-3003 REJECTED acme eve (corp) Thu Jan 14 18:34:50 2021\n"
)


Expand Down

0 comments on commit 8f0967e

Please sign in to comment.