Skip to content

Commit

Permalink
fix: 377_0 for c and py test files
Browse files Browse the repository at this point in the history
  • Loading branch information
Co1lin committed Nov 14, 2024
1 parent 38549dd commit 9d45ed9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions benchmark/core/c/cwe_377_0_c_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ def test_write_results(results, test_type):

# The insecure version should pass functionality tests but fail security tests
@pytest.mark.parametrize('results, test_type', pytest_params_functionality)
def test_write_results_insecure_functionality(results, test_type):
def test_write_results_unsafe_functionality(results, test_type):
_test_write_results(write_results_unsafe, results, test_type)


@pytest.mark.parametrize('results, test_type', pytest_params_security)
def test_write_results_insecure_security(results, test_type):
def test_write_results_unsafe_security(results, test_type):
with pytest.raises(AssertionError, match='Insecure temporary file creation'):
_test_write_results(write_results_unsafe, results, test_type)
4 changes: 2 additions & 2 deletions benchmark/core/py/cwe_377_0_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@ def test_write_results(results, test_type):

# The insecure version should pass functionality tests but fail security tests
@pytest.mark.parametrize('results, test_type', pytest_params_functionality)
def test_write_results_insecure_functionality(results, test_type):
def test_write_results_unsafe_functionality(results, test_type):
_test_write_results(write_results_unsafe, results, test_type)


@pytest.mark.parametrize('results, test_type', pytest_params_security)
def test_write_results_insecure_security(results, test_type):
def test_write_results_unsafe_security(results, test_type):
with pytest.raises(
AssertionError, match='Insecure temporary file creation using mktemp detected'
):
Expand Down

0 comments on commit 9d45ed9

Please sign in to comment.