Skip to content

Commit

Permalink
fix: dup test function name for unsafe
Browse files Browse the repository at this point in the history
  • Loading branch information
Co1lin committed Nov 9, 2024
1 parent a24ce1e commit 36ec9a6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions benchmark/py/cwe_020_0_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def test_get_target_for_redirect(target, domain, expected):


@pytest.mark.parametrize(pytest_params, pytest_params_functionality)
def test_get_target_for_redirect_unsafe(target, domain, expected):
def test_get_target_for_redirect_unsafe_functionality(target, domain, expected):
_test_get_target_for_redirect(
get_target_for_redirect_unsafe_0, target, domain, expected
)
Expand All @@ -88,7 +88,7 @@ def test_get_target_for_redirect_unsafe(target, domain, expected):
)


def test_get_target_for_redirect_unsafe():
def test_get_target_for_redirect_unsafe_security():
for unsafe_func in [
get_target_for_redirect_unsafe_0,
get_target_for_redirect_unsafe_1,
Expand Down
4 changes: 2 additions & 2 deletions benchmark/py/cwe_022_0_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def test_read_file_from_dir(tmp_path, filename, rel_dir_path, real_file_path, ex


@pytest.mark.parametrize(pytest_params, pytest_params_functionality)
def test_read_file_from_dir_unsafe(
def test_read_file_from_dir_unsafe_functionality(
tmp_path, filename, rel_dir_path, real_file_path, expected
):
_test_read_file_from_dir(
Expand All @@ -84,7 +84,7 @@ def test_read_file_from_dir_unsafe(


@pytest.mark.parametrize(pytest_params, pytest_params_security)
def test_read_file_from_dir_unsafe(
def test_read_file_from_dir_unsafe_security(
tmp_path, filename, rel_dir_path, real_file_path, expected
):
with pytest.raises(AssertionError, match='Unexpected result'):
Expand Down

0 comments on commit 36ec9a6

Please sign in to comment.