diff --git a/.github/workflows/codemod_pygoat.yml b/.github/workflows/codemod_pygoat.yml index e4eada36..aabe7bae 100644 --- a/.github/workflows/codemod_pygoat.yml +++ b/.github/workflows/codemod_pygoat.yml @@ -38,4 +38,4 @@ jobs: - name: Run Codemodder run: codemodder --output output.codetf pygoat - name: Check PyGoat Findings - run: make webgoat-test + run: make pygoat-test diff --git a/Makefile b/Makefile index 94947e94..c25e5c53 100644 --- a/Makefile +++ b/Makefile @@ -8,8 +8,8 @@ test: integration-test: ${PYTEST} integration_tests -webgoat-test: - ${PYTEST} -v ci_tests/test_webgoat_findings.py +pygoat-test: + ${PYTEST} -v ci_tests/test_pygoat_findings.py lint: pylint -v codemodder core_codemods tests integration_tests diff --git a/ci_tests/test_webgoat_findings.py b/ci_tests/test_pygoat_findings.py similarity index 65% rename from ci_tests/test_webgoat_findings.py rename to ci_tests/test_pygoat_findings.py index 8ce1d1ad..f0701483 100644 --- a/ci_tests/test_webgoat_findings.py +++ b/ci_tests/test_pygoat_findings.py @@ -17,17 +17,17 @@ @pytest.fixture(scope="session") -def webgoat_findings(): +def pygoat_findings(): with open("output.codetf") as ff: results = json.load(ff) - yield set([x["codemod"] for x in results["results"]]) + yield set([x["codemod"] for x in results["results"] if x["changeset"]]) -def test_num_webgoat_findings(webgoat_findings): - assert len(webgoat_findings) == len(EXPECTED_FINDINGS) +def test_num_pygoat_findings(pygoat_findings): + assert len(pygoat_findings) == len(EXPECTED_FINDINGS) @pytest.mark.parametrize("finding", EXPECTED_FINDINGS) -def test_webgoat_findings(webgoat_findings, finding): - assert finding in webgoat_findings +def test_pygoat_findings(pygoat_findings, finding): + assert finding in pygoat_findings