Skip to content

Commit f514ff7

Browse files
committed
Fix regexp to not use *
1 parent 70e262c commit f514ff7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/unit/test_cli_audit.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def test_audit_proj_non_existing_key() -> None:
7474

7575

7676
def test_audit_cmd_line_settings(csv_file: Generator[str]) -> None:
77-
"""test_audit_cmd_line_settings"""
77+
"""Verifies that passing audit settings from command line with -D<key>=<value> works"""
7878
what_to_audit = ["logs", "projects", "portfolios", "applications", "qualityProfiles", "qualityGates", "users", "groups"]
7979
cli_opt = " ".join([f"-Daudit.{what}=true" for what in what_to_audit])
8080
assert tutil.run_cmd(audit.main, f"{CMD} {cli_opt} --{opt.REPORT_FILE} {csv_file}") == e.OK
@@ -100,14 +100,14 @@ def test_filter_type(json_file: Generator[str]) -> None:
100100

101101
def test_filter_problem(csv_file: Generator[str]) -> None:
102102
"""Verify that filtering by problem id works"""
103-
regexp = "(OBJECT.*|QG.*)"
103+
regexp = "(OBJECT.+|QG.+)"
104104
assert tutil.run_cmd(audit.main, f"{CMD} --{opt.REPORT_FILE} {csv_file} --problems {regexp}") == e.OK
105105
assert tutil.csv_col_match(csv_file, "Problem", regexp)
106106

107107

108108
def test_filter_multiple(csv_file: Generator[str]) -> None:
109109
"""Verify that filtering by problem id works"""
110-
regexp = "(OBJECT.*|QG.*)"
110+
regexp = "(OBJECT.+|QG.+)"
111111
assert (
112112
tutil.run_cmd(audit.main, f"{CMD} --{opt.REPORT_FILE} {csv_file} --{opt.TYPES} HOUSEKEEPING --{opt.SEVERITIES} MEDIUM --problems {regexp}")
113113
== e.OK

0 commit comments

Comments
 (0)