Skip to content

Commit 8462f1d

Browse files
committed
fix tests
1 parent bd3e94e commit 8462f1d

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

.github/workflows/main.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
sudo apt-get update -qy
3232
sudo apt-get install ripgrep
3333
pip3 install -r requirements.txt
34-
python3 run_json.py --path=./tests/mock_repo --mode=check --err_file=err_biased_lang.log
34+
python3 run_json.py --path=./tests/mock_repo --err_file=err_biased_lang.log
3535
coverage run --omit '/usr/*' -m pytest && coverage report -m
3636
github_docker_build_publish_test:
3737
runs-on: ubuntu-latest

tests/unit/test_unit.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -111,18 +111,17 @@ def test_rg_search():
111111
def test_build_args_dict():
112112
extra_slash_path = mock_repo_path + '/'
113113
args = build_args_dict(
114-
[f'--path={extra_slash_path}', '--url=https://cd.splunkdev.com/engprod/biased-lang', '--mode=check', '--err_file=fake_file'])
114+
[f'--path={extra_slash_path}', '--url=https://cd.splunkdev.com/engprod/biased-lang', '--err_file=fake_file'])
115115
assert args['path'] == mock_repo_path
116-
assert args['mode'] == 'check'
117116
assert args['err_file'] == constants.ERR_FILE
118-
assert len(args) == 11
117+
assert len(args) == 9
119118

120119

121120
def test_process_word_occurrences(batch_info):
122121
biased_word = 'whitelist'
123122
rg_results = rg_search(biased_word, mock_repo_path)
124123
json_results, word_report, events = process_word_occurrences(
125-
rg_results, batch_info, biased_word, False, mock_repo_path, True)
124+
rg_results, batch_info, biased_word, mock_repo_path, True)
126125
assert json_results['num_matched_lines'] == 4
127126
assert json_results['num_matched_words'] == 5
128127
assert json_results['num_matched_files'] == 3

0 commit comments

Comments
 (0)